Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper committed Dec 22, 2023
1 parent c489d43 commit bac2fd6
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/pages/basics/sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ See the [Validate session cookies](/guides/validate-session-cookies) and [Valida

### Create session cookies

You can create a session cookie for a session with [`Lucia.createSessionCookie()`](/reference/main/Lucia/createSessionCookie). It takes a session and returns a new [`SessionCookie`](/reference/main/SessionCookie) instance. You can either use [`SessionCookie.serialize()`](https://oslo.js.org/reference/session/SessionCookie/serialize) to create `Set-Cookie` HTTP header value, or use your framework's API by accessing the name, value, and session.
You can create a session cookie for a session with [`Lucia.createSessionCookie()`](/reference/main/Lucia/createSessionCookie). It takes a session and returns a new [`Cookie`](/reference/main/Cookie) instance. You can either use [`Cookie.serialize()`](https://oslo.js.org/reference/cookie/Cookie/serialize) to create `Set-Cookie` HTTP header value, or use your framework's API by accessing the name, value, and session.

```ts
const sessionCookie = lucia.createSessionCookie(session.id);
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/guides/validate-session-cookies/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ If your framework provides utilities for cookies, you can get the session cookie
const sessionId = getCookie(lucia.sessionCookieName);
```

When setting cookies you can get the cookies name, value, and attributes from the `SessionCookie` object.
When setting cookies you can get the cookies name, value, and attributes from the `Cookie` object.

```ts
const sessionCookie = lucia.createSessionCookie(sessionId);
Expand Down
8 changes: 8 additions & 0 deletions docs/pages/reference/main/Cookie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: "@components/Layout.astro"
title: "Cookie"
---

# `Cookie`

See [`Cookie`](https://oslo.js.org/reference/cookie/Cookie) from `oslo/cookie`.
4 changes: 2 additions & 2 deletions docs/pages/reference/main/Lucia/createBlankSessionCookie.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Method of [`Lucia`](/reference/main/Lucia). Creates a new cookie with a blank va
## Definition

```ts
//$ SessionCookie=/reference/main/SessionCookie
function createBlankSessionCookie(): $$SessionCookie;
//$ Cookie=/reference/cookie/Cookie
function createBlankSessionCookie(): $$Cookie;
```
4 changes: 2 additions & 2 deletions docs/pages/reference/main/Lucia/createSessionCookie.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Method of [`Lucia`](/reference/main/Lucia). Creates a new session cookie.
## Definition

```ts
//$ SessionCookie=/reference/main/SessionCookie
function createSessionCookie(sessionId: string): $$SessionCookie;
//$ Cookie=/reference/cookie/Cookie
function createSessionCookie(sessionId: string): $$Cookie;
```
8 changes: 0 additions & 8 deletions docs/pages/reference/main/SessionCookie.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/pages/reference/main/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ title: "lucia API reference"

- [`LegacyScrypt`](/reference/main/LegacyScrypt)
- [`Lucia`](/reference/main/Lucia)
- [`SessionCookie`](/reference/main/SessionCookie)
- [`Cookie`](/reference/main/SessionCookie)
- [`Scrypt`](/reference/main/Scrypt)
- [`TimeSpan`](/reference/main/TimeSpan)

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/tutorials/username-and-password/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ The tutorials go over how to implement a basic username and password auth and co
- [Astro](/tutorials/username-and-password/astro)
- [Next.js App router](/tutorials/username-and-password/nextjs-app)
- [Next.js Pages router](/tutorials/username-and-password/nextjs-pages)
- [SvelteKit](/tutorials/username-and-password/sveltekit)
- [SvelteKit](/tutorials/username-and-password/sveltekit)

0 comments on commit bac2fd6

Please sign in to comment.