Coder Social home page Coder Social logo

Comments (3)

fnakstad avatar fnakstad commented on July 30, 2024

Alright, this is fixed. Thanks for posting!
As for the second suggestion, you can change the access level of the auth/twitter route on the server-side to anon if you want to deny logged in users. However, in the example I think I'll just keep it the way it is since it's not really a problem if the user reauthorizes himself.

from angular-client-side-auth.

danielabar avatar danielabar commented on July 30, 2024

Just my two cents worth re: authorized user being able to get back to the Login page. It did used to work this way but then the following would occur:

  1. User logs in successfully
  2. User clicks Browser back button
  3. System detects user is logged in and redirects them to logged in view
  4. Repeated for as many times as user clicks Browser back
  5. Unless user realizes there is logout link, they will be stuck in this redirect loop

The problem with this is users generally expect Browser back to take them back to previous page, and they could get frustrated/confused otherwise. In a desktop, not so bad because they can close the browser tab. But I tried this on mobile and was totally stuck, no way to get out of it except killing the browser app. Even then next time I opened browser was taking me back to logged in view. Had to delete my cache and cookies to get out of it. (compounding this issue, entirely my fault, my responsive nav wasn't behaving correctly so user could not get to logout link).

My preference would be if authorized user is allowed to view login page.

from angular-client-side-auth.

fnakstad avatar fnakstad commented on July 30, 2024

That's a really good point, amd I'm a little torn on this. It can be easily rectified by changing the accessLevel of the login page, but I think I'll keep it as it is in the example app. Instead I've been thinking of having more detailed error messages when someone tries to access a route they don't have permission to see. That way we can provide the user with more specific feedback about why he can't see the route he's trying to access.

from angular-client-side-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.