Skip to content

Commit 45467c2

Browse files
committed
Add the jose library
1 parent 0109153 commit 45467c2

File tree

6 files changed

+53
-1293
lines changed

6 files changed

+53
-1293
lines changed

lib/ts/framework/nextjs.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,11 @@ type SuperTokensProviderProps = {
4545
pathName?: string;
4646
};
4747

48-
export const SuperTokensProvider: React.FC<
49-
PropsWithChildren<SuperTokensProviderProps>
50-
> = (props) => {
51-
48+
export const SuperTokensProvider: React.FC<React.PropsWithChildren<SuperTokensProviderProps>> = (props) => {
5249
RouterInfo.router = props.router;
5350
if (props.pathName) {
5451
RouterInfo.pathName = props.pathName;
5552
}
5653

57-
return <SuperTokensWrapper {...props}>
54+
return <SuperTokensWrapper {...props} />;
5855
};

lib/ts/recipe/session/framework/nextjs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function parseFrontToken(frontToken: string): AccessTokenPayload {
130130

131131
async function parseAccessToken(token: string): Promise<AccessTokenPayload> {
132132
const JWKS = jose.createRemoteJWKSet(new URL(`${getRefreshApiPath()}/authjwt/jwks.json`));
133-
const { payload } = await jose.jwtVerify(token, JWKS);
133+
const { payload } = await jose.jwtVerify<AccessTokenPayload>(token, JWKS);
134134
return payload;
135135
}
136136

lib/ts/recipe/session/nextjs/README.md

Lines changed: 0 additions & 156 deletions
This file was deleted.

lib/ts/recipe/session/nextjs/getSessionOrRedirect.tsx

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)