aad_oauth icon indicating copy to clipboard operation
aad_oauth copied to clipboard

How to get refresh token

Open Refaydeen opened this issue 2 years ago • 9 comments

How to get refresh token ,can we do a sso in Microsoft through this package,is that possible

Refaydeen avatar Sep 30 '23 17:09 Refaydeen

you can fetch it after a successful auth:

        final result = await authenticator.login(refreshIfAvailable: true);
        result.fold(
              (failure) => throw Exception(failure.message),
              (token) => token.refreshToken
        );

qaniel avatar Oct 06 '23 03:10 qaniel

the code above you mentioned will work on web also right? and can we give my credentials in my login and authenticate through microsoft is that possiible

Refaydeen avatar Dec 12 '23 15:12 Refaydeen

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you still think this issue is needed, reopen it again.

github-actions[bot] avatar Feb 21 '24 02:02 github-actions[bot]

I'm having a similar issue where the authentication flow is only returning an object with the accessToken, and the refreshToken call is returning a 'null' value. I have already included the 'offline_access' scope in my request. Is there any update regarding this problem?

ariaguirre avatar Apr 05 '24 18:04 ariaguirre

@ariaguirre have you got the solution i am facing same problem.

I am getting null in refresh token always

AniketStemmOne avatar Jun 17 '24 11:06 AniketStemmOne

you can fetch it after a successful auth:

        final result = await authenticator.login(refreshIfAvailable: true);
        result.fold(
              (failure) => throw Exception(failure.message),
              (token) => token.refreshToken
        );

How does this differ from the built in function of refreshToken() ?

paulhwangfti avatar Jul 02 '24 18:07 paulhwangfti

Hi any update on this?

srinivasii avatar Jul 09 '24 10:07 srinivasii

Hi any update on this?

Nope, haven't heard since but maybe looking into the codebase would answer that question. Just haven't gotten around to it yet.

paulhwangfti avatar Jul 09 '24 13:07 paulhwangfti

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you still think this issue is needed, reopen it again.

github-actions[bot] avatar Oct 09 '24 02:10 github-actions[bot]

Closing this issue due to lack of activity.

github-actions[bot] avatar Nov 10 '24 02:11 github-actions[bot]