apache / apache/pouchdb

pouchdb-authentication, getSession() with different domain shows null

Open
#8,584 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
17.6k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

### Issue
I'm using **pouchdb-authentication** plugin to handle my couchdb authentication. The issue is when I try to login a valid user with different domains like front end domain: http://localhost:8080/login and backend domain: http://127.0.0.1:5984/mydb/ my getSession() function returns a null userCxt name: userCtx: {name: null, roles: []}. however when I try to login same user with same domains like front end domain: http://localhost:8080/login and backend domain: http://localhost:5984/mydb/ my getSession() function returns the user userCxt name: userCtx: {name:"testUser", roles: []}.

### Info
- Environment: browser
- Platform: Chrome
- Adapter: none
- Server: CouchDB

### Reproduce

To reproduce the issue:
- create a login form running on a domain different from the couchdb domain
- create the poucdb instance with http://127.0.0.1:5984/mydb/ or some other remote couchdb
- authenticate the user with pouchdb-authentication login function
- get the user session with pouchdb-authentcation getSession() function

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.