Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented /auth/callback and minor type refactor #83

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

Deeds67
Copy link
Member

@Deeds67 Deeds67 commented Jan 7, 2025

  • Refactored Authentication result types to be more descriptive for what they're used for
  • Implemented the /auth/callback route, so that the redirect_uri switch should be easy

Copy link

sonarqubecloud bot commented Jan 7, 2025

@Deeds67 Deeds67 changed the title Feat/brak idp spike Implemented /auth/callback and minor type refactor Jan 7, 2025
accessToken,
expiresAt,
};

try {
const parsedUser = UserSchema.parse(user);
Copy link
Member Author

@Deeds67 Deeds67 Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deemed it unnecessary to validate the object structure here, since the cookie is signed, therefore we are sure that the cookie has the type that we set it to

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Additionally, unit tests may take care of any other errors later.

Copy link
Member

@manuelpuchta manuelpuchta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvements!

accessToken,
expiresAt,
};

try {
const parsedUser = UserSchema.parse(user);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Additionally, unit tests may take care of any other errors later.

Comment on lines +16 to +17
export enum AuthenticationProvider {
BEA = "bea",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

@Deeds67 Deeds67 merged commit 0311b3b into main Jan 7, 2025
11 checks passed
@Deeds67 Deeds67 deleted the feat/brak_idp_spike branch January 7, 2025 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants