Comments (7)
I'm currently using popup, which works fine with AngularJS.
I havent tried, but I dont think using redirect should be a problem with Angular, as long as you have the route in place..? Do you have more info? What did you try?
from oauthd.
When I use OAuth.redirect
with AngularJS - I have broken routing after authorization and redirect to a page that accepts a parameters #oauthio={"status": "success", "data": ...}
. And instead of the root route - /#!/
, in the address bar is only a symbol #
. In firebug i see error:
Error: [$location:ihshprfx] http://errors.angularjs.org/1.2.2/$location/ihshprfx...
My code:
OAuth.redirect(provider, {
state: 'j5v1wdiQrZAz4Nuy1vg7WpmZCe2I3X10dE0rE4kZlA'
}, 'http://localhost/learning/oauthio/#!/');
from oauthd.
This should be fixed in a futur version, but currently i advise you to use either popup or an html5 routing in angular
from oauthd.
What will help me html5 routing?
from oauthd.
http://docs.angularjs.org/guide/dev_guide.services.$location in "html5 mode" you can get rid of hashbangs so i did not test yet but i guess it won't be a problem if the hash is removed
from oauthd.
It is now possible to use hashes in redirects. By example:
OAuth.initialize("...");
demoApp.controller('connectCtrl', function connectCtrl($scope, $rootScope, $location) {
$scope.connect = function() {
OAuth.redirect("twitter", "#/timeline");
}
});
demoApp.controller('timelineCtrl', function timelineCtrl($scope, $rootScope) {
OAuth.callback(function(err, res) {
if (err) return alert(err);
$rootScope.twitter = res;
});
$rootScope.twitter.get('/1.1/statuses/home_timeline.json').done(function(data) {
$scope.tw_timeline = data;
$scope.$apply();
});
});
from oauthd.
I just moved to angular 1.3 today and of course, my oauth.io is broken. seems to redirect just fine adn my token is passed to me, but then the controller crashes and restarts.. so it's in some nasty loop. Any clue what i can do about this?
angular.min.js:100:132Error: [$rootScope:infdig] http://errors.angularjs.org/1.3.0-rc.5/$rootScope/infdig?p0=10&p1=%5B%5D
$digest@http://localhost/bower_components/angular/angular.min.js:120:330
$apply@http://localhost/bower_components/angular/angular.min.js:122:413
http://localhost/bower_components/angular/angular.min.js:18:107
e@http://localhost/bower_components/angular/angular.min.js:36:220
d@http://localhost/bower_components/angular/angular.min.js:18:28
pc@http://localhost/bower_components/angular/angular.min.js:18:317
Fd@http://localhost/bower_components/angular/angular.min.js:17:131
http://localhost/bower_components/angular/angular.min.js:244:464
j@http://localhost/bower_components/jquery/dist/jquery.min.js:2:27129
fireWith@http://localhost/bower_components/jquery/dist/jquery.min.js:2:54631
ready@http://localhost/bower_components/jquery/dist/jquery.min.js:2:29742
I@http://localhost/bower_components/jquery/dist/jquery.min.js:2:29927
angular.min.js:120Error: [$rootScope:infdig] http://errors.angularjs.org/1.3.0-rc.5/$rootScope/infdig?p0=10&p1=%5B%5D
angular.min.js:120:331Error: [$rootScope:infdig] http://errors.angularjs.org/1.3.0-rc.5/$rootScope/infdig?p0=10&p1=%5B%5D
angular.min.js:100:132null
from oauthd.
Related Issues (20)
- Oauthd updates HOT 6
- XSS Vulnerability in Firefox HOT 3
- Can't seem to create new profile HOT 29
- Web frontend is broken HOT 1
- You must provide a state when server-side auth HOT 1
- Slack Issues for "incoming webhooks" HOT 8
- Moving to a new server - best method? HOT 1
- Shopify - missing option to specify shop?
- Still supported / active? HOT 1
- Reset admin password? HOT 3
- XSS Vulnerability with upper cased Javascript protocol HOT 2
- vk.com me() function returns 500 HOT 1
- Fix CI
- I am just wondering where does oauthd persist the api keys? HOT 1
- Provider: google - Legacy People API HOT 1
- This is a dead project.. right??? HOT 2
- The service is offline HOT 7
- Update JS SDK
- Investigate LinkedIn v2 migration
- Always return raw values after authentication
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauthd.