V3 is coming #66
Pinned
rphlmr
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there,
I'll publish a v3 with some breaking changes on the "auth module".
I have launched a new stack with a new way to commit auth session and I want to have the same pattern on every stack I maintain :)
Nothing hard to understand but a major change:
requireAuthSession
will no more magically refresh the session inloader
.Currently:
loader
function, If the access_token expires, I refresh it and reload theloader
.action
function, because we can't reload it, you have to commit the session in everyreturn json
.In future, you will have to commit the session in
loader
andaction
.Because writing the full header is too long, I have imagined something and will provide a
response
helper to handle that for you.Spoilers:
authSession
will have acookie
property that is nothing more than the result ofsessionStorage.commitSession(session, { maxAge: SESSION_MAX_AGE, })
.Then,
response.ok
orresponse.error
will put this cookie in headers :)You can check what is coming here: https://github.com/rphlmr/supa-stripe-stack
Beta Was this translation helpful? Give feedback.
All reactions