【发布时间】:2020-09-17 16:58:46
【问题描述】:
我有 keylcoak 的本地实例,我正在尝试将我的颤振应用程序连接到它,为此我正在关注 this tutorial,但我陷入了这个 redirect_uri 问题。
在 android 的 build.gradle 中,我在默认配置中添加了以下部分:
applicationId = 'com.my.example_app'
manifestPlaceholders = [
'appAuthRedirectScheme': 'com.my.example_app'
]
在我的代码中:
const REDIRECT_URI = 'com.my.example_app://login-callback';
//some code in between
final AuthorizationTokenRequest req = AuthorizationTokenRequest(
CLIENT_ID,
REDIRECT_URI,
allowInsecureConnections: true,
issuer: ISSUER,
discoveryUrl: DISCOVERY_URL,
scopes: SCOPES);
final AuthorizationTokenResponse result = await appAuth.authorizeAndExchangeCode(req);
所以当我按下 login 时,它会将我重定向到 keycloak 页面,但我看到的只是:
有谁知道这里正确的重定向 uri 值是什么?
【问题讨论】: