如何从用户池(而不是从身份池)使用联合身份验证! [英] How to use Federation from a User Pool (not from an Identity Pool)!

查看:121
本文介绍了如何从用户池(而不是从身份池)使用联合身份验证!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用用户池中的联盟。请注意,我不是谈论联邦身份池的概念不同。

I'm trying to use Federation from a User Pool. Note, I am not talking about Federated Identity Pool a different concept.

是否有针对联合用户的SignIn API或仅仅是托管的UI

应用是否必须在看起来像 https://XXXXXX.au=的登录URL上打开浏览器th.XXXXX.amazoncognito.com/login?response_type=code&client_id=XXXXXXXXX&redirect_uri=XXXXXXX ?最终用户可以留在应用程序中吗,类似于Android上的Google SignIn API的工作原理(它会弹出一个小的Google登录界面,用户单击其名称,您会立即使用令牌返回应用程序内部。

Does the app "have to" open a browser on a Sign In URL that looks like https://XXXXXX.au=th.XXXXX.amazoncognito.com/login?response_type=code&client_id=XXXXXXXXX&redirect_uri=XXXXXXX? Can the end-user can stay inside the app, similar to how Google SignIn API on Android works (it pops up a small Google sign in UI, user clicks on their name, you're immediately back inside the app with a token.

如何在该登录URL上启动浏览器?

用户完成登录后,如何调用我的应用程序?

特别是我的移动应用程序如何从浏览器接收令牌? p>

Specifically how does my mobile app receive the token from the browser?

推荐答案

是否有针对联合用户的SignIn API或仅是托管UI?

据我所知,将用户池与社交IdP联合时必须使用托管UI。

As far as I can tell you have to use the hosted UI when you federate a user pool to social IdPs.

如何在该登录URL上启动浏览器?

这显然取决于语言和平台,在具有Xamarin的Android上,您可以使用Xamarin。 Auth.Presenters.OAuthLoginPresenter.Login()启动本机浏览器Chr在您传入的OAuth2Authenticator指定的URL处进行操作。OAuth2Authenticator所做的不只是制作它提供给Chrome浏览器的URL(有状态的),因此当您以代码或令牌的形式返回答案时,您可以在该方法上调用方法反对继续。

This depends on the language and platform obviously, on Android with Xamarin you can use Xamarin.Auth.Presenters.OAuthLoginPresenter.Login() to launch a native browser Chrome at a URL specified by the OAuth2Authenticator you pass in. That OAuth2Authenticator does more than just craft the URL it gives Chrome, its stateful so when you get an answer back in the form of a code or token, you can then call methods on that object to proceed.

用户完成登录后如何回叫我的应用?

具体来说,浏览器如何重定向URL,实际上如何将您重定向回应用程序内部。这是通过称为深层链接&应用链接,在 Android 上解释了这一概念。

Specifically how can the browser redirecting a URL actually redirect you back inside the app. That's done via something called, Deep Links & App Links, here's that concept explained on Android.

这篇关于如何从用户池(而不是从身份池)使用联合身份验证!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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