ServiceStack: Get email from auth session when authenticating with Google

会有一股神秘感。 提交于 2019-12-05 15:51:05
jeffgabhart

You will need to pull the data from the AuthProvider and set the value in the CustomUserSession. An example of this is shown in the SocialBootstrapApi sample

https://github.com/ServiceStack/SocialBootstrapApi/blob/master/src/SocialBootstrapApi/Models/CustomUserSession.cs#L50

Override OnAuthenticated, find the GoogleOpenIdOAuthProvider to get to the email address.

Another example is shown at ServiceStack OAuth - registration instead login

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!