Skip to content

Commit f48c7d0

Browse files
committed
Initial
0 parents  commit f48c7d0

21 files changed

+5509
-0
lines changed

.env.local.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Available in your WorkOS dashboard
2+
WORKOS_CLIENT_ID=
3+
WORKOS_API_KEY=
4+
5+
# The endpoint that WorkOS will redirect to after a user authenticates
6+
WORKOS_REDIRECT_URI="http://localhost:3000/api/callback"
7+
JWT_SECRET_KEY="your_secret_here"

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env*.local
29+
30+
# vercel
31+
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Next.js integration example using AuthKit
2+
3+
An example application demonstrating how to authenticate users with AuthKit and the WorkOS Node SDK.
4+
5+
## Project setup
6+
7+
To get started, clone the repo:
8+
9+
```bash
10+
git clone https://github.com/workos/next-authkit-example.git
11+
```
12+
13+
Navigate to the cloned repo and install the dependencies:
14+
15+
```bash
16+
npm install
17+
```
18+
19+
## Getting started with WorkOS
20+
21+
Sign up for a [WorkOS account](https://dashboard.workos.com/signup), log in, then go to the `configuration` tab on the left and copy the Client ID.
22+
23+
Next, navigate to the API keys tab and grab a secret key.
24+
25+
Rename the `.env.local.example` file to `.env.local` and supply your Client ID and API key.
26+
27+
Finally, start the development environment and navigate to http://localhost:3000.
28+
29+
```bash
30+
npm run dev
31+
```

next.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
experimental: {
4+
serverActions: true,
5+
},
6+
};
7+
8+
module.exports = nextConfig;

0 commit comments

Comments
 (0)