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

feat: multiple auth methods for identities #2606

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

DanielHougaard
Copy link
Contributor

Description 📣

This PR implements support for adding multiple auth methods to an identity. It only supports adding different auth methods, you cannot add two of the same auth methods.

This initiative brings no breaking changes.

Minor

  1. Additionally I've made an improvement to the generate schema script. It now also runs eslint fix after generating the new schemas, so we don't have to manually fix the schemas after generation.

  2. Fixed a typo that's been present in the backend for a while. IdentityAuthMethods.Univarsal had a typo and improper casing, it's now named IdentityAuthMethods.UNIVERSAL_AUTH

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests 🛠️

# Here's some code block to paste some code snippets

@DanielHougaard DanielHougaard self-assigned this Oct 17, 2024
@DanielHougaard DanielHougaard force-pushed the daniel/multiple-auth-methods branch 2 times, most recently from db8f6e9 to b823ffd Compare October 17, 2024 23:05
Copy link
Member

@akhilmhdh akhilmhdh left a comment

Choose a reason for hiding this comment

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

Small concerns and changes. Need to application test it

.select("id")
.from(TableName.Identity)
.whereRaw(`${TableName.IdentityAccessToken}."identityId" = ${TableName.Identity}.id`)
.whereNotNull("authMethod");
Copy link
Member

Choose a reason for hiding this comment

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

I am bit confused by this whereNotNull. Because its with no auth method set right?

Copy link
Member

Choose a reason for hiding this comment

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

Also i don't think there will be access token with unconfigured identity. It will have an auth method right to get a token

backend/src/services/identity/identity-fns.ts Outdated Show resolved Hide resolved
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