Earlybyte / aad_oauth

Flutter Azure Active Directory OAuth Package
https://pub.dev/packages/aad_oauth
MIT License
93 stars 185 forks source link

How to get refresh token #271

Open Refaydeen opened 11 months ago

Refaydeen commented 11 months ago

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

qaniel commented 11 months ago

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
        );
Refaydeen commented 9 months ago

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

github-actions[bot] commented 7 months ago

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.

ariaguirre commented 5 months ago

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?

AniketStemmOne commented 3 months ago

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

I am getting null in refresh token always

paulhwangfti commented 2 months ago

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() ?

srinivasii commented 2 months ago

Hi any update on this?

paulhwangfti commented 2 months ago

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.