I want to give certain admin user to ability to login using a direct link. The main admin will send a link in a email to sub admin users. The sub users will click on the link and they will directly login (without entering the Username and Password) on some page.

Is there a way to do this in Magento 2 or do i need something to do this feature?

  • 1
    magento provides session ids for customers – Aditya Shah Sep 28 '18 at 16:44
  • 1
    built-in session manager that generates a new random session ID with high entropy after login. – Aditya Shah Sep 28 '18 at 16:45
  • Any reference? Can you give me any lnks here – Avesh Naik Oct 1 '18 at 10:44
  • Please give the inks in Ans. So i could mark as found. – Avesh Naik Oct 1 '18 at 11:01
  • 1
    Actually i have a solution but you have to customize in magento. – Aditya Shah Oct 1 '18 at 11:02

Solution 1

It is indeed not possible to pass the username and password via query parameters in standard HTTP auth.

  • Instead, you use a special URL format, like this: http://username:password@example.com/
  • this sends the credentials in the standard HTTP "Authorization" header.

It's possible that whoever you were speaking to was thinking of a custom module or code that looked at the query parameters and verified the credentials. This isn't standard HTTP auth, though, it's an application-specific thing.

NOTE : http://username:password@example.com will works for FireFox, Chrome, Safari BUT not for IE.

Solution 2

Passing authentication parameters in query string

When using OAuth or other authentication services you can often also send your access token in a query string instead of in an authorization header, so something like:



NOTE : Magento provide OAuth token, so you can achieve it by this way.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.