Replies: 2 comments
-
If i understand your question correctly Refresh Scheme should be the goal. From the backend you need to send your token and refresh Token back to the frontend. auth: {
strategies: {
local: {
scheme: 'refresh',
token: {
property: 'access_token',
maxAge: 1800,
// type: 'Bearer' << default
},
refreshToken: {
property: 'refresh_token',
data: 'refresh_token',
maxAge: 60 * 60 * 24 * 30
},
user: {... },
endpoints: {...},
}
}
} you may adjust the properties to your names, so frontend and backend align with each other. For more visit the Docs |
Beta Was this translation helpful? Give feedback.
0 replies
-
The problem is that in my case tokens are not properties in a response payload, the response has a Set-Cookie header with authorization and refresh tokens. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am currently working with a backend that provides users their access and refresh tokens via cookies.
Since both
cookie
andrefresh
schemes extend thelocal
scheme, there is not commonrefreshToken
property.Is there any way to use these schemes or should I just implement a custom one?
Beta Was this translation helpful? Give feedback.
All reactions