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

Logging in sometimes redirect to wrong url #149

Open
adrianblancode opened this issue May 15, 2014 · 1 comment
Open

Logging in sometimes redirect to wrong url #149

adrianblancode opened this issue May 15, 2014 · 1 comment
Labels

Comments

@adrianblancode
Copy link
Member

I tried logging in, but instead of being redirected to the main page after a successful login I was somehow redirected to http://qwait.csc.kth.se/api/users?role=admin for some odd reason. I have no idea what caused this or how to reproduce it, but it ocurred after I had already input my password wrong once into the KTH login. Not sure if that has got anything to do with it or not.

@dflemstr
Copy link
Member

So apparently the Spring Security system DOES have support for "redirect back to where you were," because it stores the location of the last "unauthorized" page you went to.

It works like this:

  • You are not logged in
  • You load some page, e.g. "/"
  • The "users" Angular service does a request to the URL "/api/users?role=admin"
  • The above URL can only be accessed while logged in, so the server responds with "Unauthorized" (probably? check your debug log in Chrome to see what it responds with). For me it looks like this:
    image
  • You do some other stuff and press "/login"
  • The server somehow thinks your last visited page is the API page
  • You do the login flow
  • You are redirected back to that URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants