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

[PoC][WIP, not ready for review]feat: add abstractions in authentication module #2445

Closed
wants to merge 3 commits into from

Conversation

jannyHou
Copy link
Contributor

Signed-off-by: jannyHou [email protected]

connect to #2435

A start of refactoring abstractions into @loopback/authentication, more stuff are in progress and feedback welcomed at any time.

@@ -22,3 +23,31 @@ export interface UserProfile {
name?: string;
email?: string;
}

export type Credentials = {
email: string;

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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';
Copy link
Contributor

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

Copy link
Contributor Author

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.

@jannyHou jannyHou changed the title [WIP]feat: add abstractions in authentication module [WIP, not ready for review]feat: add abstractions in authentication module Feb 26, 2019
@jannyHou jannyHou changed the title [WIP, not ready for review]feat: add abstractions in authentication module [PoC][WIP, not ready for review]feat: add abstractions in authentication module Feb 26, 2019
@jannyHou
Copy link
Contributor Author

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 ^

@jannyHou jannyHou closed this Mar 12, 2019
@jannyHou jannyHou deleted the auth/add-interfaces branch April 25, 2019 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants