【发布时间】:2014-03-08 13:31:32
【问题描述】:
我正在使用 phonegap android 应用程序实现 oauth2,但在检索重定向 URL 时遇到了问题。
以下是服务器在成功授权后重定向到的重定向 URL。
http://localhost/tutorsapp/assets/www/#state=123&access_token=b3edb8eec17c7f99048f7132836dd822f0078a702842928e197efe37eba6959215216e1b677ca96906d5dfcc0ae17d35b4b1&token_type=bearer&expires_in=10800
我想知道如何在 Javascript 中检索重定向的 URL,以便我可以保存 access_token。
我试过 window.location.href。但这不起作用。
提前感谢您的帮助!
【问题讨论】: