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

Add a method to tag the AuthStatus as disconnected and redirect to a login URL #17

Open
bgaillard opened this issue Mar 26, 2015 · 0 comments
Assignees
Milestone

Comments

@bgaillard
Copy link
Member

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.

@bgaillard 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
@bgaillard bgaillard added this to the 1.0.0 milestone Nov 4, 2015
@bgaillard bgaillard self-assigned this Nov 4, 2015
@bgaillard bgaillard modified the milestones: 0.3.0, 1.0.0 Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant