Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Adds a very basic POC for http-only cookies #146

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions example/next-cookies/README.md
@@ -0,0 +1,25 @@
# Example: cookie authentication (API routes)

This example shows how to use Supabase auth both on the client (`useAuth` hook) and server in [API routes](https://nextjs.org/docs/api-routes/introduction) and when using [`getServerSideProps` (Server-side Rendering)](https://nextjs.org/docs/basic-features/data-fetching#getserversideprops-server-side-rendering).

## Configuration

### 1. Build the auth client

In the root directory run `npm run build`

### 2. Start the server

In the `infra` directory run `docker-compose up`

### 3. Install dependencies

```bash
npm install
```

### 4. Run the app

```bash
npm run dev
```