This is an example of how to sign up, sign in, authenticate, send PIN code by email, sign in with Google and sign in with Twitter.
This project does not have a sign up process. If the account does not exist in the database when you sign in, it will be created automatically.
You can sign in with only your email address and PIN code. To confirm your email address, this project will email you a PIN code. You can also sign in with Google and sign in with Twitter.
Here are the steps:
# Clone the repo to your current directory
git clone https://github.com/sinProject-Inc/sveltekit-authentication-example.git
# Install the dependencies
cd /sveltekit-authentication-example
npm install
DATABASE_URL="mysql://user:password@localhost:3306/sveltekit_authentication"
GMAIL_USER="[email protected]"
GMAIL_PASS="google_app_password"
TWITTER_CLIENT_ID="(option)"
TWITTER_CLIENT_SECRET="(option)"
npx prisma db push
# Start the server and open the app in a new browser tab
npm run dev -- --open
Insert roles and lifetimes settings:
visit http://localhost:5173/initialize_database
Please report any issues here. Pull requests are encouraged especially as SvelteKit is evolving rapidly.