I am trying to add a login with github in my application. Therefore, when testing on my local computer, I set my callback as http://localhost:8000/login/callback/ .
And after that I add a link to enter my page, for example, <a href="https://github.com/login/oauth/authorize?client_id=CLIENT_ID&scope=user&redirect_uri=http://localhost:8000/login/callback">Login</a> as well as
$routeProvider.when('/login/callback', { controller: 'loginCtrl' });
Success returned me a code with a link like: http://localhost:8000/login/callback?code=cd07ff3b70f5d1d1b8a2 . But angularjs cannot answer correctly.
Error response Error code 404. Message: File not found. Error code explanation: 404 = Nothing matches the given URI.
I also tried setting redirect_url to http://localhost:8000/#/login/callback , but the return link looks like this: http://localhost:8000/?code=61e9c8b73c073a0bccc0/#/login/callback
I need a code that will appear at the end of the URL, but not in the middle, so I can use $location.search().code to get my code. How can I install it correctly?
How to change my redirect_uri or change my router?
source share