Skip to content

Commit

Permalink
UPD: removed env variable email domain as it was breaking the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MennaTullahTaha committed May 14, 2024
1 parent 3e49800 commit ec076f5
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {
stringifyEntityRef,
DEFAULT_NAMESPACE,
} from '@backstage/catalog-model';
import dotenv from 'dotenv';
import { OAuthResult } from '@backstage/plugin-auth-backend';
import { SignInInfo, AuthResolverContext } from '@backstage/plugin-auth-node';

dotenv.config();

export const resolverResult = async (
profile_input: SignInInfo<OAuthResult>,
ctx: AuthResolverContext,
Expand All @@ -25,7 +22,7 @@ export const resolverResult = async (

const [localPart, domain] = profile.email.split('@');

if (domain !== process.env.EMAIL_DOMAIN) {
if (domain !== 'code.berlin') {
throw new Error(`Login failed due to incorrect email domain.`);
}

Expand Down

0 comments on commit ec076f5

Please sign in to comment.