-
-
Notifications
You must be signed in to change notification settings - Fork 171
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 a json pointer for the session object #392
feat: add a json pointer for the session object #392
Conversation
* @default / Access the root of the session response object | ||
* @example /data/user Access the `data/user` property of the session response object | ||
*/ | ||
sessionDataResponseTokenPointer?: string |
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.
I think we can move this and the sessionDataType
into the SessionConfig
and then use it for all providers, right?
Defaults would just need to be slightly different per provider:
- pointer defaults:
/
- session data defaults: https://sidebase.io/nuxt-auth/v0.6/application-side/session-access-and-management#sessiondata
Tghis would be nice as it would unify behavior of all providers + make it way easier to type the return of the authjs
provider (which was a big pain before). What do you think?
is this going to be merged? |
I would like to see that the review of @BracketJohn is addressed before moving on! |
6 months have passed, have you had a chance to look at the @BracketJohn review please? I think we really need to merge it. |
Hi @valh1996 👋 You are welcome to also fork this PR and make the required changes! We can then look into merging this soon! |
Closed in favour of #592 |
…onConfig (#592) * feat: add generic to "jsonPointerGet" * feat: implement the sessionDataJsonPointer * feat: add to docs * feat: move pointer and sessionDataType to the SessionConfig * fix: remove default baseUrl * fix merge conflicts from main * fix: merge conflict with SessionConfig * reset to main branch state * fix: lint * feat: make session refresh params optional * feat: rebase `jsonPointerGet` function on @Danielwinkelmann's original modifications * refacto: set the return type when extracting json pointers * fix: should use the pointer to retrieve the user session not datatype + improves returned error * revert: import as type * fix lint * fix: type issue - forgotten changes from daniel * move the session data type back to the providers (local and refresh) * forget to remove baseurl while testing * fix: use config directly * docs: add session data type to the refresh docs * fix(playground): reset to default pointer '/' Co-authored-by: Marsel Shayhin <[email protected]> * Update useAuth.ts * Update useAuth.ts * Update helpers.ts * Update helpers.ts * fix: usage of `/` in json pointer get --------- Co-authored-by: Daniel Winkelmann <[email protected]> Co-authored-by: Daniel <[email protected]> Co-authored-by: Zoey <[email protected]> Co-authored-by: Valentin Hutter <[email protected]> Co-authored-by: Valentin Hutter <[email protected]> Co-authored-by: Marsel Shayhin <[email protected]>
Closes #350 .
add a json pointer for the session object.
Checklist:
#
)