strongloop / loopback-component-passport

LoopBack passport integration to support third party logins and account linking
Other
139 stars 228 forks source link

Provide a way to deny login base on profile get from third-party #152

Closed tobernguyen closed 6 years ago

tobernguyen commented 8 years ago

When implement login with Google for my application, I have a need to only accept email from domain "abc.xyz". But I couldn't find any way to customize as my need.

Is there any way to achieve that? If not, I would happy to make a pull request.

jannyHou commented 8 years ago

@tobernguyen I think you can define a custom validator: See how to define and use a custom validator by doc: http://apidocs.strongloop.com/loopback-datasource-juggler/#validatable

jannyHou commented 8 years ago

@tobernguyen Does the above solution fix your problem? I am glad to discuss here if you need any help.

renanwilliam commented 8 years ago

@jannyHou but the custom validor will be called automatically or it's needed include a hook 'before save' to validate?

stale[bot] commented 7 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 6 years ago

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.