Add org id to id token after login

Hi,

We are using auth0 organizations for a B2B use case, we have a scenario where a user may belong to multiple organizations. At application level we don’t want to force users to enter an organization before login but rather allow them to login and list all organizations they are part of and let them choose an organization.

In this case would it be possible to get an updated ID token with selected organization id? The reason I ask is it will be more secure if the org id comes from jwt token itself rather than we store it somewhere and then add additional code to check if the org_id has been tampered with.

Also please let me know if there is a way in auth0 to customize the default behaviour of prompting for organization before login, can we customize auth0 to let users login and list all organizations that the user is a member of?