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

question: How to override default auth routing and callback action #138

Open
quantjin opened this issue Mar 18, 2016 · 3 comments
Open

question: How to override default auth routing and callback action #138

quantjin opened this issue Mar 18, 2016 · 3 comments

Comments

@quantjin
Copy link

Hello, I'm testing sails-auth 2.1.3 with sails 0.12.1

I used /auth/google or other social auth to authorize session, when session is authorized, the default callback is to display the current user record in json format.
How do I change callback so that after authorization it redirects to some url like /?

Also, some url like /login, /register is used by sails-auth, I want to use sails url slug /:account for user profile, but this would have conflict with /login etc.
How do I change the url used by sails-auth to like /auth/login, /auth/register?

Thanks!

@cyri113
Copy link

cyri113 commented Aug 16, 2016

Did anyone figure this out? Specifically the callback. Right now, when I POST /register, I am redirected to res.ok(user) [see UserController]. Is there a way of overriding this so that we can redirect to a page?

@ikari-pl
Copy link

I, in turn, would need this in order to add another verification step — I don't have a better idea on how to check if passport authenticated my user, but additionally let me check if the user is active, etc.

@rsibanez89
Copy link

I have overriden the create method defined in "/node_modules/sails-auth/api/controllers/UserController.js".

Simple example for using sails-auth

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

No branches or pull requests

4 participants