如何在电子应用程序中使用外部浏览器(chrome、firefox 等)实现 auth0 身份验证 [英] how implement auth0 authentication using external browser(chrome,firefox etc.) in electron application

查看:31
本文介绍了如何在电子应用程序中使用外部浏览器(chrome、firefox 等)实现 auth0 身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的电子应用程序中使用 auth0 身份验证.无论如何,我都没有使用电子应用程序的浏览器窗口.所以,我想在外部浏览器(chrome、Firefox 等)或安装的默认浏览器中打开我的 auth0 身份验证窗口.有什么办法吗?

I am using using auth0 authentication in my electron app. I am not using browser window of electron app in any case. So, I want want to open my auth0 authentication window in external browser(chrome,Firefox etc.) or installed default browser. Is there any way?

推荐答案

您可以在这里使用一些电子功能.首先,您需要使用 这个 Electron 在外部浏览器中打开 Auth0 身份验证窗口接口

You can use a few electron features here. First you need to open the Auth0 auth windows in the external browser using this Electron api

然后您使用默认浏览器登录,并且您必须在重定向 URL 中设置一个自定义协议,该协议使用 这个 Electron api,现在您的 Electron 应用程序中有令牌.

Then you login using your default browser and you must set in your redirection URL a custom protocol that points to your react app using this Electron api, now you have the token in your Electron app.

这篇关于如何在电子应用程序中使用外部浏览器(chrome、firefox 等)实现 auth0 身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆