-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
feat: Add refresh token to signOut request body #731
base: main
Are you sure you want to change the base?
feat: Add refresh token to signOut request body #731
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MisterNox π
Thank you so much for your contribution! As we are currently aiming for a larger 0.8 release, we will add your enchantment to that release.
@phoenix-ru, I think this PR is good to go, I would recommend that after your reviews we can merge this in the next batch and relase it in the next 0.8.0-alpha.2
release!
@@ -168,7 +172,7 @@ const signOut: SignOutFunc = async (signOutOptions) => { | |||
| 'options' | |||
| 'trace'; | |||
} | |||
res = await _fetch(nuxt, path, { method, headers }) | |||
res = await _fetch(nuxt, path, { method, headers, body: method.toLowerCase() === 'post' ? body : undefined }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be better to build body only when the check is truthy:
const body = method.toLowerCase() === 'get'
? undefined
: objectFromJsonPointer(config.refreshToken.refreshRequestTokenPointer, refreshToken.value)
Hi @MisterNox π Have you had a chance to look at the review yet? Otherwise are there any other open questions I can help you with? |
π Linked issue
#730
β Type of change
π Description
Adds the refresh token to the signOut request body with the key set according to the defined
refreshRequestTokenPointer
.π Checklist