I\'d like to generate a secure one-click-access type of url similar to the examples below. I\'ll be using PHP but that is irrelevant as I\'m just looking to understand the under
Update:
For something like a single use URL, I'd go with the GUID-esque appoach that has been suggested. Make sure to have a short lifespan on the link.
For a instant log-in, there is no really secure way to have a single URL.
Yes you can generate a URL which is going to be damn near impossible to guess, but that doesn't give you super security. If you want to remember users, why not use an encrypted authentication cookie?
The example you give, Google Calendar doesn't log you in via the URL alone, you have to be authenticated first before the URL means anything.
E.g. clicking on google calendar from my gmail gives me:
https://www.google.com/calendar/render?tab=mc&gsessionid=-LTeHrnKoeAbDcVaN68NHA
That doesn't help you access my account unless you've first authenticated as me.
Old post:
You can generate a GUID in PHP using com_create _guid and use that.
On linux I think you can use uuid_create, or this code from here: