Releases: storyblok/app-extension-auth
@storyblok/[email protected]
Migrating v1 to v2
The @storyblok/app-extension-auth
v1 stored the access token in a cookie. However, in a future version of v2, the library will offer an adapter pattern, allowing you to store the access token elsewhere, such as in a dedicated database. The following breaking changes abstract the code to make this transition easier in the near future:
sessionCookieStore
→ getSessionStore
// from
import { sessionCookieStore } from '@storyblok/app-extension-auth'
// to
import { getSessionStore } from '@storyblok/app-extension-auth'
getSessionStore
const sessionStore = getSessionStore(authHandlerParams)({
req: event.node.req,
res: event.node.res,
})
The sessionStore
created by sessionCookieStore
now has three methods: get
, put
, and remove
. The getAll
method is no longer provided. If you believe the getAll
method is still useful for your use case, please let us know by opening a GitHub issue.
The put
and remove
methods now return a Promise<boolean>
instead of a Promise<void>
.
AuthHandlerParams
import { authHandler } from '@storyblok/app-extension-auth'
const params: AuthHandlerParams = {
// ...
}
authHandler(params)
The parameter AuthHandlerParams['cookieName']
has been renamed to AuthHandlerParams['sessionKey']
.
Full Changelog: https://github.com/storyblok/app-extension-auth/compare/@storyblok/[email protected]...@storyblok/[email protected]
@storyblok/[email protected]
What's Changed
Full Changelog: https://github.com/storyblok/app-extension-auth/compare/@storyblok/[email protected]...@storyblok/[email protected]
@storyblok/[email protected]
What's Changed
- feat: expire cookie after 1 week by @eunjae-lee in #41
- feat: add
inferSessionQuery
by @eunjae-lee in #43 - docs: add migration section for v2 by @eunjae-lee in #40
Full Changelog: https://github.com/storyblok/app-extension-auth/compare/@storyblok/[email protected]...@storyblok/[email protected]
@storyblok/[email protected]
What's Changed
This 2.0.0-beta.0 release introduces breaking changes. Please do not use this version in production. A more detailed changelog will be available in the upcoming stable v2 release.
Full Changelog: https://github.com/storyblok/app-extension-auth/compare/@storyblok/[email protected]...@storyblok/[email protected]
@storyblok/[email protected]
What's Changed
Full Changelog: https://github.com/storyblok/app-extension-auth/compare/@storyblok/[email protected]...@storyblok/[email protected]
@storyblok/[email protected]
What's Changed
- docs: fix README issues by @Dawntraoz in #34
- fix: increase timeout by @demetriusfeijoo in #35
New Contributors
- @Dawntraoz made their first contribution in #34
- @demetriusfeijoo made their first contribution in #35
Full Changelog: https://github.com/storyblok/app-extension-auth/compare/@storyblok/[email protected]...@storyblok/[email protected]
@storyblok/[email protected]
What's Changed
- fix(types): export
Region
type by @eunjae-lee in #32
Full Changelog: https://github.com/storyblok/app-extension-auth/compare/@storyblok/[email protected]...@storyblok/[email protected]
@storyblok/[email protected]
@storyblok/[email protected]
What's Changed
Full Changelog: https://github.com/storyblok/app-extension-auth/compare/@storyblok/[email protected]...@storyblok/[email protected]
@storyblok/[email protected]
What's Changed
- fix: add custom role type and validation by @BibiSebi in #27
- chore: release @storyblok/[email protected] by @BibiSebi in #28
New Contributors
Full Changelog: https://github.com/storyblok/app-extension-auth/compare/@storyblok/[email protected]...@storyblok/[email protected]