Login automatically by credentials in URL

Hi all Yii experts,

I’m working on an Yii project with authentication by userid/password from a login dialog with help by Yii-User (a very powerful extension, see here) - this works fine.

Now I want to add a convenient way for smartphone users to login from an QR-code printed on an authentication-sheet. The idea is the following:


[*]The user scans the QR-code with its smartphone or tablet

[*]The browser opens the URL

[*]The user is automatically logged in into the Yii application, without entering any userid/password


First tests with the URL of the login page embedded within the QR-code already works fine.

Is there a way to embed some user-credentials or session-id within an URL to allow an user to login without typing userid and password?

It would be enough to work only once, for the first login. The user could be forced to change the initial password to an individual ones and this is saved within his browsers password safe.

Thanks a lot


Do you not want to save the user’s entered password in your server? I was thinking of just generating some unique key string that would allow someone to activate an account in your system/site, then invalidating that key after it is used once