Struggling to implement a custom login screen for my Angular app locally by following this guide. The issue lies in the fact that my login callback is not being triggered.
The original login URL is 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 get here');
});
}
return {
login: login
};
});
angular.module('myApp').controller('LoginCtrl', function ($scope, $location, authService) {
$scope.login = function() {
...
authService.login($scope.user.email, $scope.user.password)
Upon login, the redirection is to
http://localhost:9000/#/access_token<myaccesstoken>&id_token=<myIdToken>&token_type=Bearer
Why am I being redirected to this URL without my callback being triggered?
Additionally, when should I utilize the function authenticateAndGetProfile()
as outlined in the guide?