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

use session varable "fromWhere" for routing whenever it is set #100

Merged
merged 2 commits into from
Feb 28, 2014
Merged

use session varable "fromWhere" for routing whenever it is set #100

merged 2 commits into from
Feb 28, 2014

Conversation

softwarerero
Copy link
Contributor

To not route to fromWhere when an email is used to sign up seems unneccesary to me and to do so would be helpful in my szenario.

On a side note: Wouldn't it be nicer to intruduce a new configuration variable like 'signUpSuccessRoute' or so instead of a session variable? There is already a route for the dashboard in config so it would look like a more consistent API. Also I cannot see the advantage of the dynamic a session variable brings to the game.

@queso
Copy link
Contributor

queso commented Feb 27, 2014

@softwarerero did you look at the signInRequired method? The idea is if you hijack a link to the sign in / sign up page, you get back to what you were doing before the sign in hijack... Make sense? To get an email to work, just link to the intended page in the email and if they get redirected to the sign in page, they will get back to the intended link after sign in.

@softwarerero
Copy link
Contributor Author

Exactly, but the hijack did not work when signing up with an email, that's what I tried to fix. Does this make sense?

@queso
Copy link
Contributor

queso commented Feb 28, 2014

Bah, ignore travis, something broke with 0.7.1

@queso
Copy link
Contributor

queso commented Feb 28, 2014

Oic, yeah, your PR makes sense now. Thx!

@softwarerero
Copy link
Contributor Author

My motivation for doing this is that I want to create mandant (separate collection) after a new user signs up, so I saw that I could reuse the 'fromWhere' logic, although a callback method as a configuration parameter would be cleaner to my taste.

@queso
Copy link
Contributor

queso commented Feb 28, 2014

Could you use onCreateUser to do what you need?

queso added a commit that referenced this pull request Feb 28, 2014
use session varable "fromWhere" for routing whenever it is set
@queso queso merged commit 198dda2 into Differential:master Feb 28, 2014
@softwarerero
Copy link
Contributor Author

Don't think so, because when the user signs up I make him an admin for the mandant and later he can create other users but no mandant would be created. On a second thought maybe I can use onCreateUser and check if the mandant exists, will think more tomorrow.

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

Successfully merging this pull request may close these issues.

2 participants