Tenant registration on sign-in.
Can someone point me in the right direction to implement the below flow for GitHub-only auth?
Case 1: User exists and belongs to an org
-> User is signed in via GitHub
Case 2: User does not exist or belong to an org
-> GitHub auth succeeds
-> User is redirected to org registration
-> Org and user are created
I have been poking around in the docs and feel that maybe I should make
Case 1: User exists and belongs to an org
-> User is signed in via GitHub
Case 2: User does not exist or belong to an org
-> GitHub auth succeeds
-> User is redirected to org registration
-> Org and user are created
I have been poking around in the docs and feel that maybe I should make
registration_enabled? false and then define a sign_in_action_name / action that forwards the user_info and redirects to a registration page. This would would then loop back to a modified register_with_github action that also creates the org. Am I thinking about this in the right way?Solution
If not, then you can just put something in the router for if the user is signed in but has no organization_id they get sent to a different page
