Skip to content

Commit

Permalink
Merge pull request #26 from SystemEngineeringTeam/preview-support
Browse files Browse the repository at this point in the history
chore: プレビューサイトの対応
  • Loading branch information
SatooRu65536 authored Dec 26, 2024
2 parents 2da8671 + 6eefd69 commit 39a2fcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/services/auth.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ export function getAuthenticator(env: Env) {
}

const sessionStorage = getSessionStorage(env.SESSION_SECRET);
const callbackURL = new URL(env.CF_PAGES_URL);
callbackURL.pathname = '/auth/callback';
authenticator = new Authenticator<AuthUser>(sessionStorage);
authenticator.use(new Auth0Strategy(
{
callbackURL: env.AUTH0_CALLBACK_URL,
callbackURL: callbackURL.toString(),
clientID: env.AUTH0_CLIENT_ID,
clientSecret: env.AUTH0_CLIENT_SECRET,
domain: env.AUTH0_DOMAIN,
Expand Down
5 changes: 3 additions & 2 deletions worker-configuration.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Generated by Wrangler by running `wrangler types`

interface Env {
AUTH0_CALLBACK_URL: string;
AUTH0_DOMAIN: string;
AUTH0_CLIENT_ID: string;
AUTH0_CLIENT_SECRET: string;
AUTH0_DOMAIN: string;
AUTH0_CALLBACK_URL: string;
AUTH0_LOGOUT_URL: string;
AUTH0_RETURN_TO_URL: string;
SESSION_SECRET: string;
CF_PAGES_URL: string;
}

0 comments on commit 39a2fcd

Please sign in to comment.