Skip to content

Commit

Permalink
feat: Customize authsch provider
Browse files Browse the repository at this point in the history
  • Loading branch information
tomitheninja committed Sep 1, 2024
1 parent 79e616d commit ab6d30b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/authsch.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import { Strategy as PassportStrategy } from 'passport-strategy';
import { AuthSchProfile, AuthSchTokenResponse, RawAuthSchProfile, StrategyParams } from './types.js';
import { parseAuthSchProfile } from './util.js';

const authSchProvider = process.env.AUTHSCH_PROVIDER || `https://auth.sch.bme.hu`;

export class Strategy extends PassportStrategy {
private readonly tokenEndpoint = 'https://auth.sch.bme.hu/oauth2/token';
private readonly profileEndpoint = 'https://auth.sch.bme.hu/oidc/userinfo';
private readonly authEndpoint = 'https://auth.sch.bme.hu/site/login';
private readonly tokenEndpoint = `${authSchProvider}/oauth2/token`;
private readonly profileEndpoint = `${authSchProvider}/oidc/userinfo`;
private readonly authEndpoint = `${authSchProvider}/site/login`;
private clientId: string;
private clientSecret: string;
private scopes: string;
Expand Down

0 comments on commit ab6d30b

Please sign in to comment.