Giter Club home page Giter Club logo

authentication-local-management's People

Contributors

anton-nikishkin avatar chrisbujok avatar claustres avatar codingfriend1 avatar corymsmith avatar cpsubrian avatar daffl avatar eddyystop avatar ekryski avatar fiddler avatar greenkeeper[bot] avatar hardik127 avatar lwhiteley avatar markacola avatar marshallswain avatar micaksica avatar sylvainlap avatar zacaytion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

authentication-local-management's Issues

Inaccurate 'Can only affect your own account' error

Steps to reproduce

  • Tell us what broke. The more detailed the better.
  • Include the feathers-gen-specs.json file from your app.
  • Include the src/services/[serviceName]/[serviceName].schema.?s files if the issue involves the fields in one or more services.

I verified that password change is sending the correct user, auth token and such down to the server. Then on this line

the authUser Id and the user1 (from the db) id are identical, but using === directly on them still returns false.

Changing this line to stringify the ids fixes the issue

  if (options.ownAcctOnly && authUser && (`${getId(authUser)}` !== `${getId(user1)}`)) {

It might also make sense to do this in the get-id helper?

Check client-side integration with Redux

Confirm I would think feathers-redux should handle it fine. You just have to make the same authManagement service calls the functions in src/client.js make.

Confirm this is so.

Massive confusion regarding password resets. F-A-M / A-L-M

I am massively confused while implementing Password Reset through reset tokens.

After following along with the guide posted on the other repo (which has no code snippets, I had to contact the author to get a working link, found here) I got to the point where the email verification worked and was ready to implement password resetting.

Looking at the library itself I tried the following:

  • Do a POST with the following body:
{
    "action": "sendResetPwd",
    "value": {
        "email": "[email protected]"
    }
}
  • Get the 'resetToken' from the user.
  • Do a POST with the following body:
{
    "action": "resetPwdLong",
    "value": {
        "token": "$2a$13$7pV8cawWwmDy3nufgvRjPeoy2l6dEC39UtFo86ozBYUdVG2jLzY0u",
        "user": {
            "email": "[email protected]"
        },
        "password": "here_my_password"
    }
}

This gives a 'Token is not in the correct format.' error.

So I went digging into the library code itself, I noticed that it had a .indexOf('___') somewhere and decided to check what it wants. It wants the user id, combined with ___, followed by the token. So I made the body look like this:

{
    "action": "resetPwdLong",
    "value": {
        "token": "5d47226499853a39a7778ca8___$2a$13$7pV8cawWwmDy3nufgvRjPeoy2l6dEC39UtFo86ozBYUdVG2jLzY0u",
        "user": {
            "email": "[email protected]"
        },
        "password": "here_my_password"
    }
}

This gives a 'Invalid token. Get for a new one. (authManagement)'. I noticed that in that piece of code, it expects the token without the id___ prepended to it. I then tried to change that part of the library, but then it does a bcrypt.compare of 2 similar hashed tokens.

After all these hours, I started to notice that there are 2 repos:

  • feathers-authentication-management a.k.a. f-a-m which has feathers-local-management a.k.a. f-a-l on top of its README.md file.
  • this repo authentication-local-management which has feathers-authentication-management on top of its docs.md file.

If it is not by intention to mismatch the terms, I can create PRs to use consistent terminology on both repos.

tl;dr
What is the path to follow to implement the email verification, password reset etc.?

Best regards
Bart

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.