简体   繁体   中英

Including prefill option in angular auth0

I am using Auth0 for one of my projects and am stuck up with providing pre-fill options in the sign in form. Based on examples given on official Auth0 website, I used the following ways of including Auth0 in my Angular 1.5 application. I have only included the code where I tried to add the pre-filled email.

auth.signin({
  dict: {
    signin: {
      prefill: {
        email: "sameeksha.kumari@roames.com.au"
      }
    }
  },
  prefill: {
    email: "sameeksha.kumari@roames.com.au"
  }
});

And to my repeated disappointment, I keep on failing with prefilling the sign in form with email value when using it using angular. Any help is highly appreciated.

Believe your issue may be related to the version of lock you are using. Can you confirm whether you are using Lock 9+ or Lock 10+ ?

Lock 9+ was frequently used together with auth0-angular-4.js and angularjs 1.5. Running a quick grep across the Lock 9 source code base I found no matches for prefill (unlike same search against Lock 10 source code base).

Check this example that is using Lock 10+ with Angularjs 1.5.5 and auth0-7.0.3.min.js. Should give you a sample from which you can then customise to your own app - and now you have Lock 10 the prefill should be available.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM