Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How we can receive refresh_token into credentials ? #8

Open
HassanHaiderIX opened this issue Feb 17, 2021 · 2 comments
Open

How we can receive refresh_token into credentials ? #8

HassanHaiderIX opened this issue Feb 17, 2021 · 2 comments

Comments

@HassanHaiderIX
Copy link

I am having trouble to get refresh token. Once I get the token I stored it in async storage. I am not sure what steps do I have to follow to get refresh token successfully. Apparently there was an issue that was related but closed.
#5

@yumoraby
Copy link

+1 would be interested on the best practice to refresh expired tokens

@sonyarouje
Copy link
Owner

sonyarouje commented Mar 29, 2021

Can call ReactNativeADB2C.js->assureToken() to refresh the token and return the new bearer token if expired.
If you want to store tokens some where then can do the same in refreshToken (), some thing like this

      this.grantAccessToken(grantType, config)
        .then((resp) => {
         //store the resp.response in async storage.
          resolve(resp.response.access_token);
        })
        .catch((err) => {
          reject(err);
        });
    });

This is not a library, feel free to fork and modify the way you all wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants