Skip to Content
author's profile photo Former Member
Former Member

How to allow login using mobile number in b2cstorefront

Hello ,

Currently Hybris support EmailId and password to login into storefront, but as per our requirement we need to allow login using Email Id/Mobile Number as a username into storefront.

can anyone please suggest how can we achieve this requirement.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 19, 2016 at 03:48 PM

    This is how I would go about the requirement.

    Inside your login controller you would need to differentiate whether the String you were given was an email or phone number. If it is a phone number, you would then run a flexible search to get the email associated with that phone number. Then you would proceed with the login as normal using that email address and the password given from the user.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2016 at 09:14 AM

    HI Kyle,

    Thanks for the answer, but i did not find any login controller for that,

    i just gone through the code and find out that first time login will be done by spring security " spring-security-config.xml" and i did not understand from where should i wright your code suggest by you?

    Thanks, Ankit

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.