Skip to content

TheAnkushshah/Go-Verify

Repository files navigation

Go-Verify

Replicates Clerk, a widely used authentication and user management tool. It enables users to securely signup & login, manage their accounts, and access advanced authentication features such as multi-factor authentication, social logins, session management, and more, ensuring a seamless and secure user experience.

Preview

image

  1. Tech Stack
  2. Features
  3. Getting Started
  4. Feedback
  5. Contributors
  • Next.js
  • React.js
  • HTML5
  • Prisma
  • NPX
  • CSS3
  • Typescript
  • Neon - PostgreSQL
  • Next Auth
  • Resend
  • O Auth - Github & Google
  • Neon
  • Node.js
  • NPM
  • Tailwind CSS
  • Next-auth v5 (Auth.js)
  • Next.js 14 with server actions
  • Credentials Provider
  • OAuth Provider (Social login with Google & GitHub)
  • Forgot password functionality
  • Email verification
  • Two factor verification
  • User roles (Admin & User)
  • Login component (Opens in redirect or modal)
  • Register component
  • Forgot password component
  • Verification component
  • Error component
  • Login button
  • Logout button
  • Role Gate
  • Exploring next.js middleware
  • Extending & Exploring next-auth session
  • Exploring next-auth callbacks
  • useCurrentUser hook
  • useRole hook
  • currentUser utility
  • currentRole utility
  • Example with server component
  • Example with client component
  • Render content for admins using RoleGate component
  • Protect API Routes for admins only
  • Protect Server Actions for admins only
  • Change email with new verification in Settings page
  • Change password with old password confirmation in Settings page
  • Enable/disable two-factor auth in Settings page
  • Change user role in Settings page (for development purposes only)

Prerequisites

Cloning

  1. Cloning:

    Run the following command in your terminal or command prompt to clone the repository to your local machine:

    git clone https://github.com/theankushshah/oibsip_taskno.git
  2. Navigate to the Directory:

    Once cloned, navigate into the project directory using the cd command:

    cd oibsip_taskno

Download

  1. Download ZIP Code folder:

    Unzip the folder in your machine.

  2. Navigate to the Downloaded Directory:

    Open your code editor and open the unzipped folder in it then:

    cd /path/to/downloaded/folder

Cloning & Download

  1. Dependencies Installation:

    npm install
  2. Environment Variables & Database Setup:

    Create a new file named .env in the root of your project and add the following content:

    DATABASE_URL=
    DIRECT_URL=
    
    AUTH_SECRET="secret"
    
    GITHUB_CLIENT_ID=
    GITHUB_CLIENT_SECRET=
    
    GOOGLE_CLIENT_ID=
    GOOGLE_CLIENT_SECRET=
    
    RESEND_API_KEY=

    Replace the placeholder values with your actual O Auth, Resend & Database credentials. You can obtain these credentials by signing up on the Google cloud website, Github website, Resend website and Neon website

    If you're wondering why can't we use our custom email for deep email interactions is beacuse of the tech we used in the project "Resend" It is a software which allows you to send emails on any cutsom email only if you connect a domain with it otherwise a Big NO, So as we had used it without the domain So, we can only send emails i mean can do deep email interactions with the email we had registered on Resend which is - codetesterteam@gmail.com

  3. Database Run:

    Run the following command to run the database:

    npx prisma generate
    npx prisma db push
    npx prisma studio

    Open the ORM in your browser to view the database.

  4. Running:

    npm run dev

    Open http://localhost:3000 in your browser to view the project.

  5. Start Coding:

    Feel free to edit the code according to your requirements.

  6. Testing

    npm test
  7. Build for Production

    npm run build

Github

  1. Initialize a New Git Repository:

    git init
  2. Stage and Commit the Code:

    git add .
    git commit -m "Initial commit"
  3. Create a New Repository on GitHub:

    Do not initialize the new repository with a README, .gitignore, or license.

  4. Link Local Repository to GitHub:

    git remote add origin https://github.com/username/new-repo.git

    Replace https://github.com/username/new-repo.git with your actual repository URL.

  5. Push Code to GitHub:

    git branch -m main
    git pull origin main
    git push -u origin main
  6. Deployment:

    Deploy the application to your preferred hosting platform to make it accessible online.

Forking

  1. Forking:

    Run the following command in your terminal or command prompt to fork the repository to your local machine:

    git clone https://github.com/your-username/oibsip_taskno.git
  2. Navigate to the Directory:

    Once cloned, navigate into the project directory using the cd command:

    cd oibsip_taskno
  3. Start Coding:

    Make the additions & desired changes to the code.

  4. Commit & Push Your Changes to Your Fork:

    Once cloned, navigate into the project directory using the cd command:

    git add .
    git commit -m ""
    git pull origin main
    git push -u origin main
  5. Create a Pull Request:

  • Go to your forked repository on GitHub

  • Click the "Compare & pull request" button.

  • Review your changes and write a clear description of your contribution.

  • Click "Create pull request"

    I will review your pull request and decide whether to merge your changes into my repository or not

You might encounter some bugs while using this app. You are more than welcome to contribute. Just submit changes via pull request and I will review them before merging. Make sure you follow community guidelines.

Happy coding!

About

In this app we're unlocking the future, your ultimate next auth v5 adventure begins now!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published