-
Couldn't load subscription status.
- Fork 26
feat: Add siwe auth endpoints #177
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
Conversation
src/index.ts
Outdated
| { | ||
| body, | ||
| }, | ||
| true, |
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.
It would be good to make the credentials flag part of the endpoint type in api.ts.
src/index.ts
Outdated
| } | ||
|
|
||
| export function getAuthNonce(): Promise<AuthNonce> { | ||
| return getEndpoint(baseUrl, '/v1/auth/nonce', { credentials: 'include' }, 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.
Do we need to pass undefined explicitly?
| return getEndpoint(baseUrl, '/v1/auth/nonce', { credentials: 'include' }, undefined) | |
| return getEndpoint(baseUrl, '/v1/auth/nonce', { credentials: 'include' }) |
src/types/api.ts
Outdated
| post: operations['verify_auth'] | ||
| parameters: { | ||
| path: null | ||
| credentials: RequestCredentials |
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.
This can only be include, right? The endpoint doesn't make sense w/ a different value.
| credentials: RequestCredentials | |
| credentials: 'include' |
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.
Makes sense!
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.
Gut diese
What it solves
getAuthNonceandverifyAuthincludeCredentialsparameter to get/post/put/delete callsHow to test
yarn link