Skip to content

getSession() method not working for different domain #271

@faisalabdulkadir

Description

@faisalabdulkadir

I'm using the pouchdb-authentication plugin for my couchdb. whenever I try to login with a valid user via the domain http://localhost:5984/mydb the getSession() method returns the respective user name in the userCxt (userCtx: {name:"testUser", roles: []}). However the moment I try to use a different domain like http://127.0.0.1:5984/mydb getSession() method returns a null name (userCtx: {name: null, roles: []}). I'm using vue for my front end

Expected Behavior

I'm actually expecting to be able to login any remote couchdb domain and the getSession() method should return the respective authenticated userCxt name

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

1.Install pouchdb 7.3.1 and created a pouchdb instance to a couchdb http server
2. Install pouchdb-authentication and use the plugin with pouchdb
3. pass username and password to the pouchdb instance via a vue form and authenticating the user with login() method
4. call the getSession() method on the authenticated user

Context

Your Environment

  • Version of PouchDB Authentication: 1.1.3
  • Version of PouchDB: 7.3.1
  • Platform name and version:
  • Operating System and version: MacOS Catalina
  • Server: CouchDB
  • Link to your project:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions