forked from lucia-auth/lucia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b02ae0a
commit b000db6
Showing
319 changed files
with
4,765 additions
and
6,060 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
package: "@lucia-auth/oauth" # package name | ||
type: "minor" # "major", "minor", "patch" | ||
--- | ||
|
||
Require `lucia@^2.0.0` | ||
- Export `useAuth()` | ||
- Remove `provider()` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Update configuration | ||
- Remove `autoDatabaseCleanup` | ||
- Remove `transformDatabaseUser()` (see `transformUserAttributes()`) | ||
- Replace `generateCustomUserId()` with `generateUserId()` | ||
- Replace `hash` with `passwordHash` | ||
- Replace `origin` with `requestOrigins` | ||
- Replace `sessionCookie` with `sessionCookie.attributes` | ||
- Add `sessionCookie.name` for setting session cookie name | ||
- Add `transformUserAttributes()` for defining user attributes (**`userId` is automatically included**) | ||
- Add `transformSessionAttributes()` for defining session attributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Update `Auth` methods: | ||
- Remove `getSessionUser()` | ||
- Remove `validateSessionUser()` | ||
- Remove `parseRequestHeaders()` | ||
- Add `readSessionCookie()` | ||
- Add `validateRequestOrigin()` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "minor" # "major", "minor", "patch" | ||
--- | ||
|
||
Support bearer tokens | ||
- Add `Auth.readBearerToken()` | ||
- Add `AuthRequest.validateBearerToken()` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Remove primary keys | ||
- Remove `Key.primary` | ||
- Rename `Auth.createUser()` params `options.primaryKey` to `options.key` | ||
- Remove column `key(primary_key)` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
package: "@lucia-auth/adapter-sqlite" # package name | ||
type: "minor" # "major", "minor", "patch" | ||
--- | ||
|
||
Add option to configure table names in `betterSqlite3()` and `d1()` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
package: "@lucia-auth/adapter-mysql" # package name | ||
type: "minor" # "major", "minor", "patch" | ||
--- | ||
|
||
Add option to configure table names in `mysql2()` and `planetscale()` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
package: "@lucia-auth/adapter-postgresql" # package name | ||
type: "minor" # "major", "minor", "patch" | ||
--- | ||
|
||
Add option to configure table names in `pg()` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
package: "@lucia-auth/oauth" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Remove `redirectUri` from `getAuthorizationUrl()` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
package: "@lucia-auth/adapter-test" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Require `lucia@^2.0.0` | ||
- Update tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
package: "@lucia-auth/adapter-test" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Update `testAdapter()` and `testSessionAdapter()` | ||
- Rename type `QueryHandler` to `LuciaQueryHandler` | ||
- Remove `testUserAdapter()` | ||
- Test modules no longer end process by default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Remove single use keys | ||
- **Lucia v2 no longer supports `@lucia-auth/tokens`** | ||
- Remove `Session.type` | ||
- Update `Auth.createKey()` params | ||
- Remove column `key(expires)` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Update `Session` | ||
- Remove `Session.userId` | ||
- Add `Session.user` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Remove `AuthRequest.validateUser()` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
package: "@lucia-auth/adapter-session-redis" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Require `lucia@^2.0.0` | ||
- `redis()` expects az single Redis instance instead of 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Introduce custom session attributes | ||
- Update `Auth.createSession()` params | ||
- Update behavior of `Auth.renewSession()` to include attributes of old session to renewed session automatically |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Overhaul adapter API | ||
- Remove `UserAdapter.updateUserAttributes()` | ||
- Remove `UserAdapter.deleteNonPrimaryKey()` | ||
- Remove `UserAdapter.updateKeyPassword()` | ||
- Remove `Adapter?.getSessionAndUserBySessionId()` | ||
- Update `UserAdapter.setUser()` params | ||
- Remove `UserAdapter.getKey()` params `shouldDataBeDeleted()` | ||
- Add `UserAdapter.updateUser()` | ||
- Add `UserAdapter.deleteKey()` | ||
- Add `UserAdapter.updateKey()` | ||
- Add `SessionAdapter.updateSession()` | ||
- Add `Adapter.getSessionAndUser()` | ||
- Rename type `AdapterFunction` to `InitializeAdapter` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Update adapter specifications | ||
- Insert and update methods do not return anything | ||
- Insert and update methods for sessions and keys may optionally throw a Lucia error on invalid user id | ||
- Insert methods do not throw Lucia errors on duplicate session and user ids |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Remove errors: | ||
- `AUTH_DUPLICATE_SESSION_ID` | ||
- `AUTO_USER_ID_GENERATION_NOT_SUPPORTED` | ||
- `AUTH_EXPIRED_KEY` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Remove auto database clean up functionality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
package: "@lucia-auth/adapter-sqlite" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Require `lucia@^2.0.0` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
package: "major" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Update `Lucia` namespace | ||
- Rename `Lucia.UserAttributes` to `Lucia.DatabaseUserAttributes` | ||
- Add `Lucia.DatabaseSessionAttributes` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Update `Middleware` takes a new `Context` params |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
package: "@lucia-auth/adapter-mysql" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Require `lucia@^2.0.0` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Update exports: | ||
- **Replace default export with named `lucia()`** | ||
- Removed `generateRandomString()` | ||
- Removed `serializeCookie()` | ||
- Removed `Cookie` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
package: "@lucia-auth/adapter-postgresql" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Require `lucia@^2.0.0` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Rename `SESSION_COOKIE_NAME` to `DEFAULT_SESSION_COOKIE_NAME` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "minor" # "major", "minor", "patch" | ||
--- | ||
|
||
New `lucia/utils` export: | ||
- `generateRandomString()` | ||
- `serializeCookie()` | ||
- `isWithinExpiration()` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
package: "@lucia-auth/adapter-mongoose" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Require `lucia@^2.0.0` | ||
- Export adapter as named exports (`mongoose()`) | ||
- Update adapter params |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
**NPM package `lucia-auth` is renamed to `lucia`** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
package: "@lucia-auth/adapter-prisma" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Require `lucia@^2.0.0` | ||
- Export adapter as named exports (`prisma()`) | ||
- Update adapter params |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
package: "lucia" # package name | ||
type: "major" # "major", "minor", "patch" | ||
--- | ||
|
||
Update `RequestContext`: | ||
- Add `RequestContext.headers.authorization` | ||
- Add optional `RequestContext.storedSessionCookie` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"stage": "beta" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.