通过Google和Facebook等身份提供者在Keycloak上进行Android身份验证 [英] Android authentication on Keycloak with identity providers like Google and Facebook

查看:210
本文介绍了通过Google和Facebook等身份提供者在Keycloak上进行Android身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个本地android应用程序,并且正在使用keycloak身份验证,因为我的Web应用程序和我的API已经配置了keycloak.我将Facebook和Google设置为密钥斗篷的身份提供者,但现在我不知道该如何在Android应用程序中对其进行配置.

I am creating a native android application and I am using keycloak authentication, because my web app and my API is already configured with keycloak. I setup Facebook and Google as identity providers for keycloak but now I don't know how I am supposed to configure it in the Android application.

对于一般身份验证,我将使用rest调用进行改造以获取令牌,然后将令牌存储在Android帐户管理器中.

For the general authentication I am using retrofit with rest calls to get the token and after that I am storing the token in Android Account manager.

我希望我的Android应用程序通过Facebook或Google通过Keycloak成功进行身份验证.有什么建议吗?

I want my android app to successfully authenticate via Facebook or Google through Keycloak. Any suggestions, please?

推荐答案

答案是,我应该使用keycloak功能进行从外部到内部的令牌交换.详情请参阅: https ://github.com/keycloak/keycloak-documentation/blob/master/securing_apps/topics/token-exchange/token-exchange.adoc .

The answer is that I should use the keycloak functionality for token exchange from external to internal. See for more details: https://github.com/keycloak/keycloak-documentation/blob/master/securing_apps/topics/token-exchange/token-exchange.adoc.

这篇关于通过Google和Facebook等身份提供者在Keycloak上进行Android身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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