stormpath / stormpath-sdk-angularjs

User Management for AngularJS (1.x) applications
http://docs.stormpath.com/angularjs/sdk/
Apache License 2.0
165 stars 58 forks source link

defaultPostLoginState not always first call after login #199

Open drano opened 7 years ago

drano commented 7 years ago

I have this configuration $stormpath.uiRouter({ loginState: 'login', defaultPostLoginState: 'postLogin' });

But some times, ui-router goes to my home (/) instead of go to my defaultPostLoginState

robertjd commented 7 years ago

Hi @drano , thanks for the report. Is there any other context you can provide that would help us create an app for reproduction? Thanks!

drano commented 7 years ago

In postlogin state, we check MFA, then a cookie is set when user has checked his MFA with a SMS code. In backend side, all routes need check about this cookie, and fail with 403 error if this cookie does not exist.

The strange behaviour comes when we clear all data and cookies in chrome and delete MFA in stormpath. Then try to login. The login button is disabled after click, and debugging ui-router, home route (/) is executed with 403 error from API server, but not the postlogin state as expected. This strange behaviour is not systematic. Sometimes postlogin state is called, sometimes home state is called.

Thank you for your help

Didier Rano

Le mar. 13 déc. 2016 à 18:36, robertjd notifications@github.com a écrit :

Hi @drano https://github.com/drano , thanks for the report. Is there any other context you can provide that would help us create an app for reproduction? Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stormpath/stormpath-sdk-angularjs/issues/199#issuecomment-266896754, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJkqyWAlItjBf4c_NCiCtjgNXZhtNCWks5rHyvsgaJpZM4LMP8U .

robertjd commented 7 years ago

Thanks @drano , we'll setup a reproduction project and reply as soon as possible.