If the requested redirect_url is http://localhost/#/login, the redirected url will become: http://localhost/?code=M2VIZWI4YTGTNJDJZI0ZOGJILWIYN2QTMDJJNGEWMWRINWZH#/login but this is incorrect The correct one should be:http://localhost/#/login?code=M2VIZWI4YTGTNJDJZI0ZOGJILWIYN2QTMDJJNGEWMWRINWZH