Make Dropbox JS OAuth work with AngularJS
Solution
In order to avoid re-auth each time after refresh, tell AngularJS router to work in html5Mode:
$locationProvider.html5Mode(true);
Reason
Because Dropbox Redirect Driver use url fragment to pass the auth info. Sample backurl looks like
http://localhost/your_app/#access_token=xxxxx...
If AngularJS router is not in html5Mode, it will try to add one '/' after the '#' to make it as
http://localhost/your_app/#/access_token=xxxxx...
Written by Tim Green
Related protips
1 Response
Where does the $locationProvider.html5Mode(true);
line go?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Oauth
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#