Comments (9)
I'm torn on this. On the one hand, I like how clean Andrew's session code is; very elegant. On the other hand, the usability perspective, I like showing the user that they are going to be redirected. Because we already frustrated the user by redirecting them to the log in page instead of where they were trying to go, so by showing the destination in the URL we can let the user know that they will redirected to where they had wanted to go, which seems respectful.
https://www.twilio.com/login?g=%2Fuser%2Faccount
https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Faccount%2Fprofile
https://www.facebook.com/login.php?next=https%3A%2F%2Fwww.facebook.com%2Fsettings
from confide.
Personally, I like the clean look and feel like a majority of people do not pay attention to the query string anyway. What they care about is logging in and then being redirected to where they were going. So lets make the redirect a little magical and handle it all behind the scenes.
from confide.
It's a debate worth having. I think the example URLs provide useful info, which as a user, lessens the frustration of being redirected to the login page instead of where I wanted to go. I don't think it's an accident that the big players chose to go that way. There is a real usability benefit to doing so.
I'm all for clean URL's, but I don't think removing potentially useful information is necessarily a good trade off. (Speaking of clean URLs... ;), do you guys think that maybe Confide should default to /login
and /signup
, instead of /user/login
and /user/create
?)
p.s. @andrew13 I wish Github still had messaging... I've been playing with LaravelBootstrapStarter, it looks pretty cool. I have a view composer, unit tests for it, and basic master.blade.php that I'm going to post soon. The view composer handles logic used by the master template such as automatically setting the HTML language direction based on the current language, passing a page title and setting a default if unspecified, passing a meta description, meta robots, etc.
from confide.
@j20 I certainly get the idea that keeping the url param there may reduce the frustration that a user might feel. However, I would argue that frustration would be better negated by messaging on the login page itself. Relying on the user to look at the url to confirm that the redirect is going to happen is bad UX in my opinion.
I look forward to seeing a pull request coming my way. I was just getting around to setting up unit tests for it, so if you save me from doing so, that would be great.
Also if you have twitter follow and DM @andrewelkins
@Zizaco I would second the notion that /user/login and /user/signup would be better verbiage for those two actions.
from confide.
Both of you have solid arguments. But don't forget that this would be simply the "default" behavior from the generated controller code. The developer will be able to easily change it.
I will implement the redirection using sessions, to make it cleaner. But @j20, remember that you can customize this with ease.
from confide.
About the routes login & signup routes. I would say that the objective of the generated routes are to be kind of an informative template.
The user will (and should) replace the user/create
by join/us
,signup
,create_account
or anything else. I don't believe we have to care much about this.
from confide.
Okay. Sounds good.
I don't have Twitter. But I just followed you guys on Github.
If you're indifferent to the route names, I highly recommend /login, /signup, and /logout as the defaults. One less thing to change out of the box. I promise I won't mention it again though. ;) lol
@andrew13, The unit tests are for my View Composer. Not for the starter package. ;) That'd be a lot of work. When I get the view composer posted, I'll give you a heads up (I guess by opening an issue, since Github killed their messaging feature). If it looks intriguing you're welcome to use it or integrate anything from it.
from confide.
@j20 Sounds good. Off I go to write the test cases that I should have started with :)
@Zizaco At the routes, changing them now would be a bit of a change for devs that are already using it. Further, if a developer wants to change it is fairly simple to do. They would need to maintain the post routes (where the form posts to), but changing the get routes is trivial. On intuitiveness, I'd agree with @j20 though. Signup / register / join are more likely to match a developers implementation then create.
from confide.
Done: 938fbba
I just followed both of you.
About routes, I agree with you, but user/create
are more informative and didatic for a newcomer (first time using Confide). I don't worry much if 100% of the users would change it to signup
or anything else. This kind of tweak is not a bad thing, I guess.
from confide.
Related Issues (20)
- Too many assumptions that email implies a unique user - it seldom does in mature systems
- Serialization of 'Closure' is not allowed HOT 6
- Email subject in config HOT 2
- hash method and user data migrate
- How to set my own view for password reset? HOT 1
- Laravel 5 Support? HOT 3
- SMS registration HOT 1
- Deactivate user? HOT 2
- erroneous error: The credentials provided have already been used. Try with different credentials HOT 1
- Getting wrong confirmation code while registering with username and email id containing dot(.)
- composer update for laravel 5 does not work HOT 4
- 5.0.x-dev: Missing file 'tests/Confide/helpers.php' throws Fatal error during `artisan clear-compiled` HOT 1
- When I create file with using '$ php artisan confide:migration', that file's path is wrong.
- Username not accepting "." HOT 1
- Support for Laravel 5.1 HOT 2
- Confide 4.3 is full of bug HOT 1
- Class 'Zizaco\Confide\UserValidator' not found
- Wrong confirmation code
- Warning: Ambiguous class resolution, "ConfideSetupUsersTable"
- laravel 5.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from confide.