Registering a user to other applications during registration
-
Is there an "automatic" way to register a user to a different application, say, a mobile app, when they register for, say, a web app? Or do we have to do that at the application level using an API?
-
Hiya,
There's no built in way to register someone with two applications. You could, as you mention, use the API. If I were going to do this, I'd listen for a webhook signaling completion of the web app registration (the
user.registration.create
event) and then add the mobile app registration using the registration API.Links which may be helpful:
- https://fusionauth.io/docs/v1/tech/apis/registrations#create-a-user-registration-for-an-existing-user
- https://fusionauth.io/docs/v1/tech/events-webhooks/
An alternative would be to not use the FusionAuth OAuth themed pages at all, and drive everything via API, including the initial registration.
-
That makes sense. Thanks @dan!
-
Hi Den,
we have 3 diffrent domains and trying to impliment fusionauth, but we are not understanding how registrations will work?
and everywhere i am trying to find out with SSO, it talks about process after userlogin , but nowhere i could see anything about registrations?
Can you throw some light on this ? where will my users register for all 3 applications sitting on 3 different domains and how does fusionauth authenticate if it will not register?
I thought fusionauth will handle both processes, from same page.Regards,
Ashutosh -
It sounds like you have this situation:
appA.com
has FusionAuth application AappB.com
has FusionAuth application BappC.com
has FusionAuth application C
And you want someone to be able to register at
appA.com
and be able to log intoappB.com
andappC.com
as well. Is that correct?Are you using the FusionAuth self registration (either basic or advanced registration forms)? Or are you building your own registration from and calling the registration API?
-
@dan said in Registering a user to other applications during registration:
You are right, yes I want if a person register at any of appA.com appB.com or appC.com they should be able to login.
Nothing has been implemented yet. Currently all three applications have their own sign-in/Reg flow where we save each user to respective app db. with SSO wish to give cross application access depending on type of user.
We wish to use own registration form.
-
Since you are building your own registration form, can you just call the register API three times, once for each application?
-
yes we can , hit API 3 times
-
Ah, great, that's the way I'd do it, then. Unless I missing something that would cause that to be a non-optimal solution.
-
so you mean , every time on registration form info would go to 3 applications and also to Fusionauth?
-
Well, I'd just call the 'create registration' API from the server three times after a user had successfully registered on your custom page: https://fusionauth.io/docs/v1/tech/apis/registrations#create-a-user-registration-for-an-existing-user
Does that make sense, or do I misunderstand your question?