diff --git a/pages/sessions/basic-api/drizzle-orm.md b/pages/sessions/basic-api/drizzle-orm.md index ce0346c..1a388fa 100644 --- a/pages/sessions/basic-api/drizzle-orm.md +++ b/pages/sessions/basic-api/drizzle-orm.md @@ -161,7 +161,7 @@ The session ID will be SHA-256 hash of the token. We'll set the expiration to 30 ```ts import { db, userTable, sessionTable } from "./db.js"; import { eq } from "drizzle-orm"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; // ... @@ -190,7 +190,7 @@ For convenience, we'll return both the session and user object tied to the sessi ```ts import { db, userTable, sessionTable } from "./db.js"; import { eq } from "drizzle-orm"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; // ... diff --git a/pages/sessions/basic-api/mysql.md b/pages/sessions/basic-api/mysql.md index b704a50..255cdaa 100644 --- a/pages/sessions/basic-api/mysql.md +++ b/pages/sessions/basic-api/mysql.md @@ -98,7 +98,7 @@ The session ID will be SHA-256 hash of the token. We'll set the expiration to 30 ```ts import { db } from "./db.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; // ... @@ -131,7 +131,7 @@ For convenience, we'll return both the session and user object tied to the sessi ```ts import { db } from "./db.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; // ... @@ -185,7 +185,7 @@ Here's the full code: ```ts import { db } from "./db.js"; -import { encodeBase32, encodeBase32LowerCaseNoPadding } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeBase32LowerCaseNoPadding } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; export function generateSessionToken(): string { diff --git a/pages/sessions/basic-api/postgresql.md b/pages/sessions/basic-api/postgresql.md index d0e4098..ba92892 100644 --- a/pages/sessions/basic-api/postgresql.md +++ b/pages/sessions/basic-api/postgresql.md @@ -98,7 +98,7 @@ The session ID will be SHA-256 hash of the token. We'll set the expiration to 30 ```ts import { db } from "./db.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; // ... @@ -131,7 +131,7 @@ For convenience, we'll return both the session and user object tied to the sessi ```ts import { db } from "./db.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; // ... @@ -185,7 +185,7 @@ Here's the full code: ```ts import { db } from "./db.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; export function generateSessionToken(): string { diff --git a/pages/sessions/basic-api/prisma.md b/pages/sessions/basic-api/prisma.md index cf9aa28..f181c61 100644 --- a/pages/sessions/basic-api/prisma.md +++ b/pages/sessions/basic-api/prisma.md @@ -90,7 +90,7 @@ The session ID will be SHA-256 hash of the token. We'll set the expiration to 30 ```ts import { prisma } from "./db.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; // ... @@ -120,7 +120,7 @@ For convenience, we'll return both the session and user object tied to the sessi ```ts import { prisma } from "./db.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; // ... @@ -174,7 +174,7 @@ Here's the full code: ```ts import { prisma } from "./db.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; import type { User, Session } from "@prisma/client"; diff --git a/pages/sessions/basic-api/redis.md b/pages/sessions/basic-api/redis.md index 72cf49c..2a107dc 100644 --- a/pages/sessions/basic-api/redis.md +++ b/pages/sessions/basic-api/redis.md @@ -67,7 +67,7 @@ The session ID will be SHA-256 hash of the token. We'll set the expiration to 30 ```ts import { redis } from "./redis.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; // ... @@ -105,7 +105,7 @@ For convenience, we'll return both the session and user object tied to the sessi ```ts import { redis } from "./redis.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; // ... @@ -159,7 +159,7 @@ Here's the full code: ```ts import { redis } from "./redis.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; export function generateSessionToken(): string { diff --git a/pages/sessions/basic-api/sqlite.md b/pages/sessions/basic-api/sqlite.md index e50993a..938992a 100644 --- a/pages/sessions/basic-api/sqlite.md +++ b/pages/sessions/basic-api/sqlite.md @@ -98,7 +98,7 @@ The session ID will be SHA-256 hash of the token. We'll set the expiration to 30 ```ts import { db } from "./db.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; // ... @@ -131,7 +131,7 @@ For convenience, we'll return both the session and user object tied to the sessi ```ts import { db } from "./db.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; // ... @@ -185,7 +185,7 @@ Here's the full code: ```ts import { db } from "./db.js"; -import { encodeBase32, encodeHexLowerCase } from "@oslojs/encoding"; +import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; import { sha256 } from "@oslojs/crypto/sha2"; export function generateSessionToken(): string {