Coder Social home page Coder Social logo

flaviuse / mern-authentication Goto Github PK

View Code? Open in Web Editor NEW
427.0 4.0 93.0 39.61 MB

MERN stack authentication boilerplate: password reset, email verification, server sessions, redux, typescript, hooks and docker for dev and prod.

Home Page: https://mern-auth-client.herokuapp.com/login

License: MIT License

HTML 2.79% CSS 1.20% JavaScript 6.89% Dockerfile 1.56% Shell 0.77% TypeScript 86.78%
email-verification mern-authentication backend frontend react docker reset-password nodejs node redux

mern-authentication's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

mern-authentication's Issues

how to run nginx server in docker

Hi, I am trying to run product mode in your project, and there is no console error.
So I tried to access via browser using https, but it seem not to be access server.
At this point, once I access via browser, there is some content updates in terminal on my server.
I don't know if it works exactly.

Module error & authentication with email

I am trying to get this up and running by using MongoDB atlas but I keep running into errors when running docker-compose up --build..

I assume by adding the following to MONGO_URI in the docker-compose.yml files it would still work, no?

mongodb+srv://admin:<password>[email protected]/<dbname>?retryWrites=true&w=majority

Screen Shot 2020-09-15 at 4 01 09 PM

Screen Shot 2020-09-15 at 4 04 03 PM

Maybe its not even related to MongoDB but that's my guess...?

Any ideas?

Can't log in

It always says *Invalid email or password. no matter what I do

Email not being sent

I've tried to run without docker so I had to setup two .envs

This is the backend:

NODE_ENV=development
MONGO_URI=mongodb-atlas-url
PORT=8081
HOST=localhost:3000
SENDGRID_API_KEY=sendgrip-api
SENDING_EMAIL=email
SESSION_KEY=my key

frontend:

NODE_ENV=development
REACT_APP_API_URL=http://localhost:8081
REACT_APP_WEBSITE_NAME=hello
CHOKIDAR_USEPOLLING=true

but I'm receiving this annoying message: *Impossible to send an email to [email protected], try again. Our service may be down.

But the API key is totally correct and I have all the enviroments that Docker has. What I may be doing wrong? Is there any additional setup to run without Docker?

Also, I have one question: Is there any simple way to completely disable e-mail verification/sending/forgot? I don't really need them atm.

Error: module not found: app/build/index.js

docker compose -f docker-compose.prod.yml --env-file client.prod.env up --build
I am trying to run this command for production mode, but it caused error.
In server, docker file is CMD ["yarn", "start:prod"]
package.json is
"scripts": {
"build": "tsc-alias --project tsconfig.json",
"dev": "ts-node-dev --respawn -r tsconfig-paths/register index.ts",
"start": "yarn build && node build/index.js",
"start:prod": "node build/index.js",
"ci": "yarn install --frozen-lockfile"
},

[Legacy] Log in not working

Running the app locally, after creating an account when redirect to login, the login feature is not working, it's constantly complaining of "Invalid username or password", which the route in the API can be found in routes/auth.js on line 35...
Does it mean the user round is not been saved or what...

savedUser is undefined

Had an error when trying to register or do anything with the API. In the auth.js route. Once you switch this to user.email instead it works.

Didn't wanna bother sending a whole pull request for such a tiny thing ๐Ÿ‘ Also a quick thing is to switch the sending email as a variable or an environmental variable as I didn't realize i needed to change it.

Thanks for your work, hopefully this will be a great bootstrap for a ecommerce stack I'm building.

[Legacy] error TypeError: Object(...) is not a function

Hello!
Thanks for a wonderful boilerplate.
Ive followed the steps and it worked so far, but whenever i hit refresh I get the following error TypeError: Object(...) is not a function.
Any ideas what it might be? Ive added console.log in the backend and get HTTP error 304 but serialized user is still in session.

How may i fix this?

Thanks
error stack:
error TypeError: Object(...) is not a function
at user (user.js:18)
at combination (redux.js:445)
at p (:1:36402)
at v (:1:36684)
at :1:40069
at Object.dispatch (redux.js:205)
at e (:1:40553)
at redux-logger.js:1
at index.js:11
at middleware.js:25
at dispatch (redux.js:611)
at user.js:7

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.