Skip to content

Commit

Permalink
Once over
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjmcgrath committed Nov 11, 2020
1 parent 5270f54 commit 953144b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 34 deletions.
1 change: 0 additions & 1 deletion examples/typescript-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.6",
"got": "^11.8.0",
"lint-staged": "^10.3.0",
"prettier": "^2.1.1",
"typescript": "4.0.2"
Expand Down
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
"@types/react": "^16.9.55",
"@types/react-dom": "^16.9.9",
"@types/request": "^2.48.4",
"@types/supertest": "^2.0.10",
"@types/webpack": "^4.41.24",
"@typescript-eslint/eslint-plugin": "^2.31.0",
"@typescript-eslint/parser": "^2.31.0",
Expand Down Expand Up @@ -119,9 +118,6 @@
},
"jest": {
"testEnvironment": "node",
"collectCoverageFrom": [
"./src/**/*.{js,jsx,ts,tsx}"
],
"rootDir": "./",
"moduleFileExtensions": [
"ts",
Expand Down
2 changes: 1 addition & 1 deletion src/auth0-session/cookie-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default class CookieStore {
const cookieOptions = {
...cookieConfig,
maxAge: transient ? undefined : exp,
secure: 'secure' in cookieConfig ? cookieConfig.secure : this.config.baseURL.startsWith('https:') // @TODO check
secure: 'secure' in cookieConfig ? cookieConfig.secure : this.config.baseURL.startsWith('https:')
};

debug('found session, creating signed session cookie(s) with name %o(.i)', sessionName);
Expand Down
4 changes: 1 addition & 3 deletions src/auth0-session/transient-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const generateCookieValue = (cookie: string, value: string, key: JWK.Key)
return `${value}.${signature}`;
};

class TransientStore {
export default class TransientStore {
private currentKey: JWK.Key | undefined;

private keyStore: JWKS.KeyStore;
Expand Down Expand Up @@ -175,5 +175,3 @@ class TransientStore {
return generators.codeChallenge(codeVerifier);
}
}

export default TransientStore;
25 changes: 0 additions & 25 deletions tests/auth0-session/handlers/logout.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,29 +154,4 @@ describe('logout route', () => {
expect(res.statusCode).toEqual(302);
expect(res.headers.location).toEqual(returnTo);
});
//
// it('should logout when scoped to a sub path', async () => {
// server = await createServer(
// auth({
// ...defaultConfig,
// session: {
// cookie: {
// path: '/foo',
// },
// },
// }),
// null,
// '/foo'
// );
// const baseUrl = 'http://localhost:3000/foo';
//
// const { jar, session: loggedInSession } = await login(baseUrl);
// assert.ok(loggedInSession.id_token);
// const sessionCookie = jar
// .getCookies('http://localhost:3000/foo')
// .find(({ key }) => key === 'appSession');
// assert.equal(sessionCookie.path, '/foo');
// const { session: loggedOutSession } = await logout(jar, baseUrl);
// assert.notOk(loggedOutSession.id_token);
// });
});

0 comments on commit 953144b

Please sign in to comment.