Skip to content

Commit a6858e7

Browse files
authored
chore: add changeset for updating saml_application_sessions table schema (#8055)
1 parent ed2098d commit a6858e7

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.changeset/cyan-buckets-care.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@logto/core": patch
3+
"@logto/phrases": patch
4+
"@logto/schemas": patch
5+
---
6+
7+
update SAML relay state length and improve error handling
8+
9+
The data type of the `relay_state` column in the `saml_application_sessions` table has been changed from varchar(256) to varchar(512) to accommodate longer Relay State values. For example, when Firebase acts as a Service Provider and initiates a SAML request, the relay state length is approximately 300-400 characters, which previously prevented Firebase from integrating with Logto as an SP before this fix.
10+
11+
Additionally, we have updated the error handling logic in the APIs related to the SAML authentication flow to make error messages more straightforward.

packages/core/src/middleware/koa-slonik-error-handler.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { DeletionError, InsertionError, UpdateError } from '#src/errors/SlonikEr
1515

1616
/**
1717
* @remarks
18-
* We are now upgrading this error handler to simultaneously handle SlonikError and DatabaseError.
18+
* We are now upgrading this error handler to handle both SlonikError and DatabaseError.
1919
* This is because DatabaseError and SlonikError, due to their different sources of definition, are not unified.
2020
* However, in practice, both are errors triggered by DB query failures.
2121
*/
@@ -44,8 +44,6 @@ export default function koaSlonikErrorHandler<StateT, ContextT>(): Middleware<St
4444
}
4545
);
4646
}
47-
48-
// TODO: add more DatabaseError code handling if needed.
4947
}
5048

5149
if (error instanceof InvalidInputError) {

0 commit comments

Comments
 (0)