I am try using Enterprise connection involved into my organization, I am using management Api to create and manage connection.
- After enabling a connection to an organization with HRD (eg. sample.com) → the two types of user should be logged into the application.
1.1. user can be sent invitation with that connection and organization and once user users the invitation user can be logged in successfully.
1.2. existing user who are not present as a SSO user, who are currently only have username and password access. can no longer use the login since HRD is enabled.
to solve these cases, we have enabled the auto-membership on login. so that existing user can onboarded. and created a post login clause to check if any of the USER_IDs with a mail has email_verified has true.
this works well, but where it breaks is, once the some random user not part of my application but part of the configured SSO, tried login
user moves to auth0-> navigate to sso via hrd → user login success → and then post login revoke access so login fails.
but user is added as a member to the organization. So, I cannot send invitation to this person again at all cases.
on these 2 cases with Enable Auto-Membership and **Disable Auto-Membership
**
give me a proper workflow on how connection and invitation can be handled for both new and existing users.
I am using /authorize call with HRD enabled connection and organization in the query param. without auto-membership and without invitation, using post login or something, can we automatically onboard that user who is already a member of that organization (same email but a DATABASE USER).