microsoft-authentication-library-for-objc icon indicating copy to clipboard operation
microsoft-authentication-library-for-objc copied to clipboard

Is there a way MSAL be able to accept a token?

Open tazevedo-ciandt opened this issue 4 years ago • 3 comments

Hi, We would like to have MSAL be able to accept a token(s) as an entry and then manage the user. We are considering programmatically authenticating a B2C using ROPC or something like that as an initial login and then give the tokens returned from the initial authentication to MSAL and have those tokens managed by MSAL and use MSAL for any future authentication.

tazevedo-ciandt avatar Jun 10 '20 17:06 tazevedo-ciandt

Thanks for bringing this up. I don't think we have this capability in MSAL right now, but we used to have something similar in ADAL where we allowed importing a refresh token: https://github.com/AzureAD/azure-activedirectory-library-for-objc/blob/master/ADAL/src/public/ADAuthenticationContext.h#L513

I believe MSAL could benefit from this as well. We'd happily accept a contribution if you'd like to submit a pull request with these changes.

oldalton avatar Jun 13 '20 19:06 oldalton

+1. We do need to send the refresh token to our backend server.

cassianodialpad avatar May 25 '21 14:05 cassianodialpad

@cassianodialpad Can you please help me When my token is expired, how to refresh a token?

dsonigara avatar Jan 09 '22 13:01 dsonigara