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

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

问题描述

我正在尝试使用 来自用户池的联合.请注意,我不是谈论联合身份池 一个不同的概念.

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

是否有针对联合用户的登录 API 或只是一个托管 UI

应用程序是否必须"在类似于 https://XXXXXX.au=th.XXXXX.amazoncognito.com/login?response_type=code&client_id=XXXXXXXXX& 的登录 URL 上打开浏览器?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 上启动浏览器?

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

具体来说,我的移动应用如何从浏览器接收令牌?

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() 在您传入的 OAuth2Authenticator 指定的 URL 上启动本机浏览器 Chrome.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 是如何真正将您重定向回应用程序的.这是通过称为 Deep Links & 的东西完成的.应用链接,这是在 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天全站免登陆