- ABP Framework version: v4.2.2
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:"
Hi Team, We have our custom mobile app. In mobile app we have integrated google and other provider for user sign-up. We would like to store mobile user sign-up information with web application so that same user can login seamlessly in mobile and web application. Please share the ABP api to use or code reference.
7 Answer(s)
-
0
We would like to store mobile user sign-up information with web application
Username password info or the external login info?
-
0
External login info like we store in web application for any external provider like "google", "twitter".
-
0
These are handled by ASP NET Core Identity by default. The data is stored in the
UserLogins
table. -
0
Hello @maliming, Thanks but i am confused.
- if external user registeration taken care by ASP NET Core Identity then how i have to register Exernal user.
- Currently to register local user we are using "/api/account/register" api endpoint. we will give a try with same api end point for external provider user registeration
- how ASP NET Core identity will determine the External provider like "Google"?
- when we login to any external provider we gets access token and id token as response, do we have to use them?
-
0
hi
This method of Account module will handle the external login.
https://github.com/abpframework/abp/blob/dev/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs#L176-L266
It will get the email of the external user and then go to register or create a new user. There is a similar code in account pro.
-
0
Hello @maliming, Thanks. i have refered the "Register" code and now can register the user. Now my question is how i can get the auth token for external user login i.e. google login user. Like steps are:
- user click on google login button
- user provide google credentials
- app receive google auth token
- Assume user is registered in idetnity server
- now how to use this auth token to get the identity server auth token so that api can be consumed in mobile app
-
0
See https://support.abp.io/QA/Questions/2604/Social-Logins-with-SaveTokens--true-not-saving-tokens#answer-b2f914ae-a820-c983-4573-3a021d98fec3