Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Switch between authenticated users in Safari Web Browsers
Sometimes I need to test a site that's protected with basic authentication with several different users. Safari, unfortunately, does not have a logout function, to forget about basic authentication credentials. To work around this issue, just insert the login and password of the new account directly in the URL, just after the http://. For example, if your URL is something like http://some.protected.site/, use this:
http://new_user:new_password@some.protected.site/
Safari will then switch to the new_user, and it will remember the switch in future visits.
    •    
  • Currently 2.67 / 5
  You rated: 4 / 5 (6 votes cast)
 
[9,871 views]  

Switch between authenticated users in Safari | 9 comments | Create New Account
Click here to return to the 'Switch between authenticated users in Safari' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Switch between authenticated users in Safari
Authored by: ghay on May 09, '07 07:46:29AM

I guess you aren't that bothered about security seeing as you are using a non SSL site, but it is worth remembering that this url will be remembered on your computer, and someone can look through your history to find your username and password.

There's also a good chance it will only work with sites using http authentication methods.



[ Reply to This | # ]
Switch between authenticated users in Safari
Authored by: Coumerelli on May 09, '07 08:02:17AM

Which, it this case, may not be an issue. I presume the 'hinter' is doing some sort of site testing, in which case would not have a cause for concern. Though, what you say is still valid - you don't want to be using this method to log into your bank account using the local Library's computer.

---
"The best way to accelerate a PC is 9.8 m/s2"



[ Reply to This | # ]
Switch between authenticated users in Safari
Authored by: zionthelion73 on May 09, '07 09:01:08AM

I think you can use this hint in any browser, not only safari.



[ Reply to This | # ]
Switch between authenticated users in Safari
Authored by: splatkus on May 09, '07 08:08:58AM

Or simply use Safari's Private Browsing feature and then quit between users.



[ Reply to This | # ]
Switch between authenticated users in Safari
Authored by: chabig on May 09, '07 08:24:42AM

If you use Private Browsing, you don't have to quit. There is no history kept.



[ Reply to This | # ]
Switch between authenticated users in Safari
Authored by: Anonymous on May 09, '07 08:43:56AM
You don't have to type the password. You can type:

http://new_user@some.protected.site/

and Safari will prompt you for the password.

[ Reply to This | # ]
Switch between authenticated users in Safari
Authored by: adrianm on May 09, '07 10:40:22AM

This, of course, only works on those olde worlde sites that still use HTTP-style authentication, which for me, is probably only my router admin page.

You also don't need to put in your password, as someone else pointed out.

---
~/.sig: not found



[ Reply to This | # ]
Switch between authenticated users in Safari
Authored by: Marsipan on May 14, '07 09:17:58AM

Funny that you refer to HTTP Authentication as "olde world".

There is a resurgence of leveraging HTTP's built-in features (such as authentication) instead of rebuilding them inside applications. See: REST @ Wikipedia.



[ Reply to This | # ]
Switch between authenticated users in Safari
Authored by: ChiefTypist on May 09, '07 08:44:57PM
And if you want to be super sekret, you can use http://:@example.com and you'll get a sheet where you can enter your name and password.

-ch


[ Reply to This | # ]