cch5ng / fe_interview

[wip] revamp of front end interview app
https://fe-interview.herokuapp.com
2 stars 0 forks source link

authentication #3

Closed cch5ng closed 5 years ago

cch5ng commented 5 years ago

3 cases to support:

(do I need Auth0 if using passport library?)

cch5ng commented 5 years ago

resource


https://github.com/jaredhanson/passport/issues/ 536

cch5ng commented 5 years ago

a little confused about next step b/c passport has so many strategies available; I know I should use jwt but not sure if there is a simple way to use jwt with passport (which one is simple but effective)

status: configuring passport

FEUserTable > findByUserName() and how to use it

cch5ng commented 5 years ago

notes:

https://github.com/themikenicholson/passport-jwt/issues/ 117

https://stackoverflow.com/questions/45897044/passport-jwt-401-unauthorized

cch5ng commented 5 years ago

overview: concept of middleware (like passport)

cch5ng commented 5 years ago

test cases


placeholder logic

                    jwt.verify(token, process.env.JWT_SECRET, (err, decoded) => {
                        if (err) {console.error('error', err)}

                        if (decoded) {console.log('jwt is valid')}
                    })
cch5ng commented 5 years ago

closing as merged