【发布时间】:2021-07-30 10:55:12
【问题描述】:
我想在我的网站登录页面中进行 oAuth2 验证,然后我想从同一页面的 url 获取令牌,但问题是我无法获取 URL。
下面的 URL 是使用此 url 的 OAuth2 url 我正在使用 Flutter 对网站进行身份验证步骤。
第一个网站将在登录页面打开后在浏览器中打开,登录后我将获得 access_token。但是我面临着如何使用 html.window.location 函数获取 access_code 的困难。
我已尝试使用此代码 WidgetsBinding.instance!.addPostFrameCallback((_) {
html.window.location.assign( 'https://example/connect/authorize?response_type=token&client_id=$clientId&redirect_uri=https://example.app/silentRenew&scope=getinfo'); });
任何人有更好的解决方案,请提供建议。
【问题讨论】:
标签: flutter