首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Amazon :在使用OIDC身份提供程序时添加自定义参数以授权URL

Amazon :在使用OIDC身份提供程序时添加自定义参数以授权URL
EN

Stack Overflow用户
提问于 2021-10-25 09:09:04
回答 1查看 371关注 0票数 1

正如标题中所述,我想在/authorize URL中添加一个自定义参数,在使用(在我的例子中是https://example.xx.auth0.com/authorize)时,科尼托重定向到该参数。

我发现您可以通过cloudformation指定一个授权URL,但它不能包含查询参数。

更多详细信息:通过无服务器 (它在引擎盖下使用Cloudformation )配置了认知:

代码语言:javascript
复制
Auth0IdentityProvider:
    Type: AWS::Cognito::UserPoolIdentityProvider
    Properties:
        UserPoolId:
            Ref: CognitoUserPool
        ProviderType: "OIDC"
        ProviderName: "Auth0"
        ProviderDetails:
            client_id: "xxxx"
            client_secret: "xxxx"
            attributes_request_method: "GET"
            oidc_issuer: "https://xxxx.xx.auth0.com"
            authorize_scopes: "openid profile email"
        AttributeMapping:
            email: "email"

当导航到科尼托托管的UI并选择Auth0提供者时,它会重定向到/authorize认知端点,后者反过来会重定向到/authorize Auth0端点。

我需要将connection参数添加到Auth0的/authorize中,以绕过它的UI并直接进入社交登录,但我一直无法找到这样做的方法。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-06-27 08:33:49

结果是,在配置Auth0客户端时,您可以指定connection参数,Auth0将跳过它的UI,但只有在配置的redirect_uri不指向本地主机时才会这样做。

代码语言:javascript
复制
auth0 = await createAuth0Client({
    redirect_uri: window.location.origin,
    scope: "openid profile email offline_access",
    connection: "linkedin",
});
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69705383

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档