We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
oidc-client-ts
Add the following class:
import Cookies from "universal-cookie"; export class CookieStorage { constructor(cookieHeader) { this._cookies = new Cookies(cookieHeader); } getItem(key) { return this._cookies.get(encodeURIComponent(key), { doNotParse: true }); } setItem(key, value) { return this._cookies.set(encodeURIComponent(key), value, { maxAge: 1000 }); } removeItem(key) { return this._cookies.remove(encodeURIComponent(key)); } }
And config it:
export function config(cookieHeaders) { const cookieStorage = new CookieStorage(cookieHeaders); return { userStore: new WebStorageStateStore({ store: cookieStorage }), stateStore: new WebStorageStateStore({ store: cookieStorage }), }; }
Then, oidc-client-ts can work on the server side. Enjoy.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add the following class:
And config it:
Then,
oidc-client-ts
can work on the server side. Enjoy.The text was updated successfully, but these errors were encountered: