GithubHelp home page GithubHelp logo

bedlam520 / thirdweb-auth-supabase Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thirdweb-example/thirdweb-auth-supabase

0.0 0.0 0.0 400 KB

Enable users to login to your backend with their wallet, and store users in supabase.

License: Apache License 2.0

JavaScript 1.27% TypeScript 74.07% CSS 24.66%

thirdweb-auth-supabase's Introduction

Getting Started

This example demonstrates how to use thirdweb Auth with Supabase.

Before running the project, you'll need to seutp and configure Supabase as specified here.

To run the project, first clone this repository, and then run one of the following commands to install the dependencies:

npm install
# or
yarn install

Next, you need to create a .env.local file and add the following environment variables:

NEXT_PUBLIC_THIRDWEB_AUTH_DOMAIN=
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE=

The NEXT_PUBLIC_THIRDWEB_AUTH_DOMAIN is used to prevent phishing attacks on the thirdweb Auth (sign-in with ethereum) request. You can learn more about it in the Auth documentation.

The remaining environment variables are used to connect to your Supabase instance, and can be found in the settings section of your Supabase dashboard.

Once you've configured the necessary environment variables, you can run this project with the following command:

npm run dev
# or
yarn dev

Now, you can navigate to http://localhost:3000 to visit the client side page where you can connect a wallet, sign-in with ethereum and view the payload, and use the payload to authenticate with the backend.

Learn More

To learn more about thirdweb, take a look at the following resources:

You can check out the thirdweb GitHub organization - your feedback and contributions are welcome!

Join our Discord!

For any questions, suggestions, join our discord at https://discord.gg/thirdweb.

thirdweb-auth-supabase's People

Contributors

adam-maj avatar saminacodes avatar avneesh0612 avatar jarrodwatts avatar kquirapas avatar

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.