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

SPA problem #2 #654

Closed
vladimirsakic opened this issue Oct 18, 2016 · 4 comments
Closed

SPA problem #2 #654

vladimirsakic opened this issue Oct 18, 2016 · 4 comments

Comments

@vladimirsakic
Copy link

after login you get back to default route, not to one you were previously on

@chenkie
Copy link

chenkie commented Oct 19, 2016

One thing you can do is store the route to go back to in params.state so that you can send the user back there after authentication. See this issue for more: #655

@vladimirsakic
Copy link
Author

Can you tell me please what to do when I pass state.
If I do something like:

lock.on('authenticated', function (authResult) {
$state.go(authResult.state);
});

It’s not working.

I managed to have it work with:

lock.on('authenticated', function (authResult) {
$timeout(function () {
$state.go(authResult.state);
}, 1);
});

But then it goes to home page and then to page on state and it’s not looking nice

Thanks a lot

@vladimirsakic
Copy link
Author

Can you tell me please what to do when I pass state.

If I do something like:

lock.on('authenticated', function (authResult) {

  $state.go(authResult.state);

});

It’s not working.

I managed to have it work with:

lock.on('authenticated', function (authResult) {

        $timeout(function () {

            $state.go(authResult.state);

        }, 1);

});

But then it goes to home page and then to page on state and it’s not looking nice

Thanks a lot

From: Ryan Chenkie [mailto:notifications@github.com]
Sent: Wednesday, October 19, 2016 10:15 PM
To: auth0/lock lock@noreply.github.com
Cc: vladimirsakic vladimir.sakic@outlook.com; Author author@noreply.github.com
Subject: Re: [auth0/lock] SPA problem #2 (#654)

One thing you can do is store the route to go back to in params.state so that you can send the user back there after authentication. See this issue for more: #655 #655


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #654 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AOmyX12jhUFqY6RoAlRHxBKpjccWSlbVks5q1noogaJpZM4KaKwY . https://github.com/notifications/beacon/AOmyX2zIcNLY8qittaMBL5_FQf9LrGnmks5q1noogaJpZM4KaKwY.gif

@vladimirsakic
Copy link
Author

Can you tell me please what to do when I pass state.

If I do something like:

lock.on('authenticated', function (authResult) {

  $state.go(authResult.state);

});

It’s not working.

I managed to have it work with:

lock.on('authenticated', function (authResult) {

        $timeout(function () {

            $state.go(authResult.state);

        }, 1);

});

But then it goes to home page and then to page on state and it’s not looking nice

Thanks a lot

From: Cristian Douce [mailto:notifications@github.com]
Sent: Thursday, October 20, 2016 10:09 PM
To: auth0/lock lock@noreply.github.com
Cc: vladimirsakic vladimir.sakic@outlook.com; Author author@noreply.github.com
Subject: Re: [auth0/lock] SPA problem #2 (#654)

Closed #654 #654 .


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #654 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AOmyX5Q8JQciSAodQ0f0FzVPhBdaF531ks5q18pBgaJpZM4KaKwY . https://github.com/notifications/beacon/AOmyX2ohR-gvupUX4Z97vKtqObh1fA1Jks5q18pBgaJpZM4KaKwY.gif

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

3 participants