如何使用社交身份提供商提供的登录信息获取refresh_token?

时间:2018-12-18 10:09:04

标签: amazon-web-services amazon-cognito aws-userpools

如何使用社交身份提供商提供的登录信息获取refresh_token?

目前,我正在

  1. id_token
  2. access_token

但是,我还需要refresh_token来自动重新进行身份验证,以获取ID access_token。

输入网址

https://xxxxxxxx.auth.eu-west-1.amazoncognito.com/login?response_type=code&client_id=xxxxxxxxxxx&redirect_uri=https://stackoverflow.com/

输出网址

https://stackoverflow.com/#id_token=eyJraWQiOiIwN3Fuc2VnMTRJQXdjSGJJMGdvZUIzb3hVTGhrNjFPTlZYUEJkSXpyWWFzPSIsImFsZyI6IlJTMjU2In0.eyJhdF9oYXNoIjoiR1d1eUluMC1ZNm9VQndiUTJabzJBQSIsInN1YiI6ImVkNWM3ODhjLTE0Y2YtNDA2MC1iY2RmLWRiMzM1OTY1MTM4NCIsImF1ZCI6IjRlaDhydGJocDFpZTU5dmNnZTF0NzBvYTJyIiwiY29nbml0bzpncm91cHMiOlsiZXUtd2VzdC0xX0lONjluaklQc19Hb29nbGUiXSwiaWRlbnRpdGllcyI6W3sidXNlcklkIjoiMTAwMzgwMTA0OTgyNTA0MDA5ODAwIiwicHJvdmlkZXJOYW1lIjoiR29vZ2xlIiwicHJvdmlkZXJUeXBlIjoiR29vZ2xlIiwiaXNzdWVyIjpudWxsLCJwcmltYXJ5IjoidHJ1ZSIsImRhdGVDcmVhdGVkIjoiMTU0NTExOTM4NDM4MiJ9XSwidG9rZW5fdXNlIjoiaWQiLCJhdXRoX3RpbWUiOjE1NDUxMjY0MzcsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xX0lONjluaklQcyIsImNvZ25pdG86dXNlcm5hbWUiOiJHb29nbGVfMTAwMzgwMTA0OTgyNTA0MDA5ODAwIiwiZXhwIjoxNTQ1MTMwMDM3LCJpYXQiOjE1NDUxMjY0Mzd9.QFnsW4qGHh4_CC9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