javascript - Trying to figure out auth0 custom login screen callback url -


i've been trying follow this guide custom login screen work angular app locally. part i'm struggling on login callback never gets called.

my original login url http://localhost:9000/#/login

angular.module('myapp').service('authservice', function ($location, angularauth0) {      function login(username, password, callback) {         console.log('in login service');     angularauth0.login({       connection: 'username-password-authentication',       responsetype: 'token',       email: username,       password: password     }, function(err) {         console.log('we never here');     });   }      return {       login: login     };  });   angular.module('myapp').controller('loginctrl', function ($scope, $location, authservice) {      $scope.login = function() {         ...         authservice.login($scope.user.email, $scope.user.password) 

when login, redirected http://localhost:9000/#/access_token<myaccesstoken>&id_token=<myidtoken>&token_type=bearer

why redirected url , callback never called?

also when supposed use function authenticateandgetprofile() create in guide?

ok in working auth0 support team, seems documentation missing section has since been added:

register authenticateandgetprofile in app.run.js authentication results processed after login.  // app.run.js  (function () {    'use strict';    angular   .module('app')   .run(function (authservice) {    // process auth token if exists , fetch profile   authservice.authenticateandgetprofile();   });  })(); 

that missing piece , works.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -