Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper committed Jan 4, 2024
1 parent d93515d commit 085ecec
Show file tree
Hide file tree
Showing 23 changed files with 101 additions and 74 deletions.
6 changes: 0 additions & 6 deletions .auri/$ypf7ombn.md

This file was deleted.

18 changes: 11 additions & 7 deletions docs/pages/basics/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,20 @@ import { Lucia } from "lucia";
const lucia = new Lucia(adapter, {
getSessionAttributes: (attributes) => {
return {
ipCountry: attributes.ip_country
country: attributes.country
};
}
});

declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseSessionAttributes: DatabaseSessionAttributes;
}
interface DatabaseSessionAttributes {
country: string;
}
}

interface DatabaseSessionAttributes {
country: string;
}
```

Expand All @@ -92,9 +94,11 @@ const lucia = new Lucia(adapter, {
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseUserAttributes {
username: string;
}
}

interface DatabaseUserAttributes {
username: string;
}
```
18 changes: 11 additions & 7 deletions docs/pages/basics/sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,18 @@ export const lucia = new Lucia(adapter, {

## Define session attributes

Defining custom session attributes requires 2 steps. First, add the required columns to the session table. You can type it by declaring the `DatabaseSessionAttributes` type (must be an interface)'.
Defining custom session attributes requires 2 steps. First, add the required columns to the session table. You can type it by declaring the `Register.DatabaseSessionAttributes` type.

```ts
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseSessionAttributes: DatabaseSessionAttributes;
}
interface DatabaseSessionAttributes {
country: string;
}
}

interface DatabaseSessionAttributes {
country: string;
}
```

Expand Down Expand Up @@ -82,10 +84,12 @@ const session = await lucia.createSession(userId, {
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseSessionAttributes: DatabaseSessionAttributes;
}
interface DatabaseSessionAttributes {
country: string;
}
}

interface DatabaseSessionAttributes {
country: string;
}
```

Expand Down
10 changes: 6 additions & 4 deletions docs/pages/basics/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@ await db.createUser({

## Define user attributes

Defining custom session attributes requires 2 steps. First, add the required columns to the user table. You can type it by declaring the `DatabaseUserAttributes` type (must be an interface).
Defining custom session attributes requires 2 steps. First, add the required columns to the user table. You can type it by declaring the `Register.DatabaseUserAttributes` type (must be an interface).

```ts
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseUserAttributes {
username: string;
}
}

interface DatabaseUserAttributes {
username: string;
}
```

Expand Down
10 changes: 6 additions & 4 deletions docs/pages/tutorials/github-oauth/astro.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ export const lucia = new Lucia(adapter, {
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseUserAttributes {
github_id: number;
username: string;
}
}

interface DatabaseUserAttributes {
github_id: number;
username: string;
}
```

Expand Down
10 changes: 6 additions & 4 deletions docs/pages/tutorials/github-oauth/nextjs-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ export const lucia = new Lucia(adapter, {
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseUserAttributes {
github_id: number;
username: string;
}
}

interface DatabaseUserAttributes {
github_id: number;
username: string;
}
```

Expand Down
10 changes: 6 additions & 4 deletions docs/pages/tutorials/github-oauth/nextjs-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ export const lucia = new Lucia(adapter, {
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseUserAttributes {
github_id: number;
username: string;
}
}

interface DatabaseUserAttributes {
github_id: number;
username: string;
}
```

Expand Down
10 changes: 6 additions & 4 deletions docs/pages/tutorials/github-oauth/nuxt.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ export const lucia = new Lucia(adapter, {
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseUserAttributes {
github_id: number;
username: string;
}
}

interface DatabaseUserAttributes {
github_id: number;
username: string;
}
```

Expand Down
10 changes: 6 additions & 4 deletions docs/pages/tutorials/github-oauth/sveltekit.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ export const lucia = new Lucia(adapter, {
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseUserAttributes {
github_id: number;
username: string;
}
}

interface DatabaseUserAttributes {
github_id: number;
username: string;
}
```

Expand Down
8 changes: 5 additions & 3 deletions docs/pages/tutorials/username-and-password/astro.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ export const lucia = new Lucia(adapter, {
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseUserAttributes {
username: string;
}
}

interface DatabaseUserAttributes {
username: string;
}
```

Expand Down
8 changes: 5 additions & 3 deletions docs/pages/tutorials/username-and-password/nextjs-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ export const lucia = new Lucia(adapter, {
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseUserAttributes {
username: string;
}
}

interface DatabaseUserAttributes {
username: string;
}
```

Expand Down
8 changes: 5 additions & 3 deletions docs/pages/tutorials/username-and-password/nextjs-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ export const lucia = new Lucia(adapter, {
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseUserAttributes {
username: string;
}
}

interface DatabaseUserAttributes {
username: string;
}
```

Expand Down
8 changes: 5 additions & 3 deletions docs/pages/tutorials/username-and-password/nuxt.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ export const lucia = new Lucia(adapter, {
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseUserAttributes {
username: string;
}
}

interface DatabaseUserAttributes {
username: string;
}
```

Expand Down
8 changes: 5 additions & 3 deletions docs/pages/tutorials/username-and-password/sveltekit.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ export const lucia = new Lucia(adapter, {
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseUserAttributes {
username: string;
}
}

interface DatabaseUserAttributes {
username: string;
}
```

Expand Down
15 changes: 9 additions & 6 deletions docs/pages/upgrade-v3/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,16 @@ export const lucia = new Lucia();
declare module "lucia" {
interface Register {
Lucia: typeof lucia;
DatabaseSessionAttributes: DatabaseSessionAttributes;
DatabaseUserAttributes: DatabaseUserAttributes;
}
interface DatabaseSessionAttributes {
country: string;
}
interface DatabaseUserAttributes {
username: string;
}
}

interface DatabaseSessionAttributes {
country: string;
}
interface DatabaseUserAttributes {
username: string;
}
```

Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-drizzle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lucia-auth/adapter-drizzle",
"version": "1.0.0-beta.4",
"version": "1.0.0-beta.5",
"description": "Drizzle ORM adapter for Lucia",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-mongodb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lucia-auth/adapter-mongodb",
"version": "1.0.0-beta.4",
"version": "1.0.0-beta.5",
"description": "MongoDB adapter for Lucia",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-mysql/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lucia-auth/adapter-mysql",
"version": "3.0.0-beta.6",
"version": "3.0.0-beta.7",
"description": "MySQL adapter for Lucia",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-postgresql/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lucia-auth/adapter-postgresql",
"version": "3.0.0-beta.8",
"version": "3.0.0-beta.9",
"description": "PostgreSQL adapter for Lucia",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-prisma/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lucia-auth/adapter-prisma",
"version": "4.0.0-beta.8",
"version": "4.0.0-beta.9",
"description": "Prisma adapter for Lucia",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-sqlite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lucia-auth/adapter-sqlite",
"version": "3.0.0-beta.11",
"version": "3.0.0-beta.12",
"description": "SQLite adapter for Lucia",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lucia-auth/adapter-test",
"version": "5.0.0-beta.6",
"version": "5.0.0-beta.7",
"description": "Testing module for Lucia database adapters",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/lucia/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lucia",
"version": "3.0.0-beta.13",
"version": "3.0.0-beta.14",
"description": "A simple and flexible authentication library",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -35,6 +35,6 @@
"vitest": "^0.33.0"
},
"dependencies": {
"oslo": "^0.25.1"
"oslo": "^0.27.0"
}
}

0 comments on commit 085ecec

Please sign in to comment.