3

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?

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

1 Answer 1

1

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:[email protected]/
  • 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:[email protected] 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:

GET

https://www.example.com/api/v1/users/1?access_token=1234567890abcdefghijklmnopqrstuvwxyzABCD

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

13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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