Refresh Token Implementation
rsemihkoca opened this issue · 0 comments
I am having difficulty finding the refresh token section in the documentation.
I have an application where I sign-in and sign-up with just email and password.
I can get IdToken and refresh token using the signinwithemailpasswordasync method.
I want to be able to return a new idtoken and refresh token thanks to the "/refresh" endpoint. Before doing this, I want to check whether the previous Idtoken and refresh token are valid. Pseudo code:
signinwithemailandpassword -> Idtoken1, refreshtoken1
/refresh endpoint (Idtoken1, refreshtoken1)
check (Idtoken1 is valid)
check (refreshtoken1 is valid) like user id matches or expires_in is valid
and return new IdToken2 and refresh token2
I use default in memory as repository. It is not necessary for me to store credentials right now. I want to open PR if I can solve the current problem