You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes when we receive an error un the parseErrorFn we simply want to mark the AuthStatus as disconnected and redirect the user to a separate login page.
For now the parseErrorFn function has only one xhr argument, this is not powerful enough because it does not offer an access to other useful objects like the current requestContext.
Refactor the parseErrorFn function :
Change the xhr argument with something which give access to more informations and functions.
Implement something like requestContext.getAuthStatus().logoutAndRedirect('http://localhost/login');
Finally I'm wondering if the loginFn method is really useful as a developer could easily add a call to its login form directly in the parseErrorFn method and simply call the OAuth.sendCredentials() method again.
The text was updated successfully, but these errors were encountered:
bgaillard
changed the title
Add a method to marque the AuthStatus as disconnected and redirect to a login URL
Add a method to tag the AuthStatus as disconnected and redirect to a login URL
Mar 26, 2015
Sometimes when we receive an error un the
parseErrorFn
we simply want to mark theAuthStatus
asdisconnected
and redirect the user to a separate login page.For now the
parseErrorFn
function has only onexhr
argument, this is not powerful enough because it does not offer an access to other useful objects like the currentrequestContext
.Refactor the
parseErrorFn
function :xhr
argument with something which give access to more informations and functions.requestContext.getAuthStatus().logoutAndRedirect('http://localhost/login');
Finally I'm wondering if the
loginFn
method is really useful as a developer could easily add a call to its login form directly in theparseErrorFn
method and simply call theOAuth.sendCredentials()
method again.The text was updated successfully, but these errors were encountered: