-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[PoC][WIP, not ready for review]feat: add abstractions in authentication module #2445
Conversation
Signed-off-by: jannyHou <juehou@ca.ibm.com>
@@ -22,3 +23,31 @@ export interface UserProfile { | |||
name?: string; | |||
email?: string; | |||
} | |||
|
|||
export type Credentials = { | |||
email: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the credentials include telephone number or username?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the credentials include telephone number or username?
#2246 - to be addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dreamdevil00 Good point. And #2246 is supposed to provide a solution for customizing the fields. (Thanks @dougal83 )
import {UserProfile, AuthenticatedUser, Credentials} from '../types'; | ||
import {Entity} from '@loopback/repository'; | ||
import {HttpErrors} from '@loopback/rest'; | ||
import {toJSON} from '@loopback/testlab'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought @loopback/testlab
is supposed to be used in tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @shazha thank you for catching it. This PR is still in progress, code changes everyday :( I will let you know when it's ready for review. Thanks for understanding.
Closing in favour of #2576. FYI: Thank you all for the feedback again. We created a new PR that starts from adding user scenarios in docs, and follow-up PRs for creating abstractions and extensions will be coming incrementally. Let's move discussions to PR ^ |
Signed-off-by: jannyHou juehou@ca.ibm.com
connect to #2435
A start of refactoring abstractions into
@loopback/authentication
, more stuff are in progress and feedback welcomed at any time.