Comments (3)
@jsheffers Yes, this does sound like a CORS issue. Since the login result is successful, and this is in turn feeds into the jDrupal.connect()
(as you noticed, which makes a call off to Drupal requesting new session info) and then the connect mechanism reports it as anonymous. This definitely sounds like a CORS issue then. I personally haven't ran into this issue, but there has been a lot of chatter about CORS in jDrupal's issue queue, as well as DrupalGap's issue queue(s), and I think the solution that folks have arrived at will work in both D7 and D8.
from angular-drupal.
I changed this so that they are on the same domain, and the cookie still won't persist. I have the URL's set up like this:
Angular: example.com:3000
Drupal: example.com
When I call the login function this is the full network tab below. I've blocked out the domain name for privacy purposes.
As you can see here the SET cookie value is working
Any other ideas? I'd love to use this, but I need user authentication to be working. You can also see the withCredentials header in each of the requests, so I don't think that's the issue. Could it be a Drupal 8.3.3 issue?
from angular-drupal.
Ended up adding the following JS to the top of my index.html page.
<script>
window.XMLHttpRequest_ = XMLHttpRequest;
XMLHttpRequest = function(){
var xhr = new window.XMLHttpRequest_;
xhr.withCredentials = true;
return xhr;
}
</script>
from angular-drupal.
Related Issues (20)
- Merge with jDrupal? HOT 5
- user/login.json 404 (Not Found) with drupal.user_login HOT 8
- Rebuild angular-drupal.min.js
- Update README examples
- Create dev branch HOT 2
- 403 Forbidden on saving a user (PATCH) HOT 7
- CSRF token issue for Safari/ios HOT 1
- Anonymous user is always returned after logging in. HOT 9
- bower.js needs to know where the src file is HOT 2
- Cookie domain HOT 3
- Login issue with different token and sessid HOT 7
- How to get success message HOT 6
- How to create node with entity field HOT 15
- Loading other entities HOT 3
- drupal.userLogout doesn't succeed. HOT 9
- How to upload images to image field? 7.x HOT 5
- 403 PUT/PATCH on user register/update on a multilingual site HOT 6
- drupal node_save created time HOT 3
- ios incompatibilities HOT 4
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 angular-drupal.