-
Notifications
You must be signed in to change notification settings - Fork 2
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
Login ignores userID in Authentication #2
Comments
I included your suggestion. Thank you for bringing the issue up :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You must include the user.id in credentialService.getCredentialByCredentialId in handleLoginFinish function.
If you have 2 logins from the same device, you must include the user.id in the database query.
In services/credentialService.ts (line 23)
async getCredentialByCredentialId(credentialId: string, userID: string): Promise<AuthenticatorDevice | null> { try { const [rows] = await promisePool.query( "SELECT * FROM credentials WHERE credential_id = ? AND user_id = ? LIMIT 1", [credentialId, userID] ); ...
In controllers/authentication.ts (line 54)
const dbCredential: AuthenticatorDevice | null = await credentialService.getCredentialByCredentialId( credentialID, loggedInUserId );
Costis
The text was updated successfully, but these errors were encountered: