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

Asking again credentials while refreshing the Token Using Smart client object. #36

Open
ShivamKP-Algoworks opened this issue Feb 22, 2021 · 2 comments

Comments

@ShivamKP-Algoworks
Copy link

Hi
I am doing a Cerner login using this library.
It's working fine and I am getting the idToken using (smartClient?.server.idToken).

But after 10 min when I am trying to refresh the token I am using the same function i.e.
smartClient.authorize(callback: { ( response, err ) in
})

but when this method gets called for refreshing the token
It's asking us again to entering the Cerner credentials(username, password )
and then updating the token.
But that is not correct, It should refresh the idToken or accessToken without asking the credentials again.

And when I am trying to refreshing the token after 9 mins then it's returning the same as previous because it's still a valid token.

So, Is there any way to refresh the token without asking for credentials again?

Thanks in advance !!!

@ShivamKP-Algoworks
Copy link
Author

Hi!
We are not getting the refresh token
that's why it's asking credentials again when we are refreshing the token.
So My question is why are we not getting the refresh token?

@raheelsayeed
Copy link

raheelsayeed commented Aug 7, 2022

Pretty late but–

using smart.ready { } before API call ensures the refresh token being updated, you don't have to call authorize.

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

2 participants