You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide current session variable in callbacks for access information stored in session and merge into new.
It's useful in cases, when you need to get some tokens from multiple service for provide integration. For example β you need to create documents in sharepoint and attach it to google calendars. In this case, i need in one time and one place two tokens β from google and from azure.
This ability in callbacks is very useful for cover case above, and accumulate all user accounts (with different emails in place, when i confident about this merge (but if it main flow for authenticated user, like "attach google account" - why not?)
@lavcraft, I'm very interested in this feature and have seen other discussion posts asking for the same. Any progress here -- willing to pitch in if you have a branch.
@balazsorban44 thanks. It's related, but not similar one. In this case, we don't need multiple sessions info in stateless token. Only need current session during authenticating process for merging.
For example:
Login via google (email1)
Login via azure (email2) while authorized from step 1. In signIn or session callback i can resolve current session and construct new session with derived roles. Also - can write new email (email2 from azure) to user info in database (may spawn additional dialog for user, like do you want attach this account to your user?)
Description π
Provide current session variable in callbacks for access information stored in session and merge into new.
It's useful in cases, when you need to get some tokens from multiple service for provide integration. For example β you need to create documents in sharepoint and attach it to google calendars. In this case, i need in one time and one place two tokens β from google and from azure.
This ability in callbacks is very useful for cover case above, and accumulate all user accounts (with different emails in place, when i confident about this merge (but if it main flow for authenticated user, like "attach google account" - why not?)
According to Discussion about handling current session β it's not so hard to implement feature :)
How to reproduce βοΈ
For examples usage (see current* args):
Or
Contributing ππ½
Yes, I am willing to help implement this feature in a PR
The text was updated successfully, but these errors were encountered: