AWS Cognito 回调 URL 中的查询字符串参数 [英] querystring parameters in callback URL for AWS Cognito

查看:22
本文介绍了AWS Cognito 回调 URL 中的查询字符串参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 cognito & 的默认登录页面尝试在回调 URL 中传递查询参数.它似乎只适用于 1 个查询参数,但不适用于 2 个(没有尝试更多).我尝试对 URL 的查询参数进行编码(如此处的某些帖子中所述),但没有奏效.什么有效

I was using the default login page for cognito & trying to pass query parameters in the callback URL. It seems to work only with 1 query param but not 2 (did not try more than that). I tried encoding the query parameters of the URL (as was mentioned in some posts here) but did not work. What works

什么不起作用

任何线索如何使这项工作?现在,我已经作弊了&将其作为 val1=val2 &解析出来.

Any clue how to make this work? For now, I have cheated & feeding it as val1=val2 & parsing it out.

我使用云形成脚本创建了用户池和身份池.

I created the user pool, identity pool using cloud formation scripts.

推荐答案

来自 AWS 的响应 -

Response from AWS -

在控制台中,您应该提供未编码的 URL -https://www.google.com?val1=a&val2=b.访问托管 UI 时,您必须提供编码的重定向 URL -redirect_uri=https%3A%2F%2Fwww.google.com%3Fval1%3Da%26val2%3Db

In the console you should provide the unencoded URL - https://www.google.com?val1=a&val2=b. When accessing the hosted UI you have to provide the encoded redirect URL - redirect_uri=https%3A%2F%2Fwww.google.com%3Fval1%3Da%26val2%3Db

希望这会有所帮助!

这篇关于AWS Cognito 回调 URL 中的查询字符串参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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