Skip to content

feat(auth): add support for openidconnect - #21

Merged
Bnyro merged 1 commit into
mainfrom
oidc
Jul 30, 2026
Merged

feat(auth): add support for openidconnect#21
Bnyro merged 1 commit into
mainfrom
oidc

Conversation

@Bnyro

@Bnyro Bnyro commented Jul 26, 2026

Copy link
Copy Markdown
Member

Test setup:

docker run -p 9400:9400 ghcr.io/geigerzaehler/oidc-provider-mock

Then, start the sync-server with cargo run.

Actual testing:

Information about OIDC if you're not familiar with the protocol: https://spapas.github.io/2023/11/29/openid-connect-tutorial/

@Bnyro

Bnyro commented Jul 26, 2026

Copy link
Copy Markdown
Member Author

cc @sourcenix, would be great if you could review it when you have time

Comment thread src/handlers/user.rs Outdated
@sourcenix

sourcenix commented Jul 26, 2026

Copy link
Copy Markdown
Contributor
thread 'tokio-rt-worker' (21957) panicked at src/main.rs:122:53:
called `Result::unwrap()` on an `Err` value: QueryError(DieselMigrationName { name: "2026-07-26-080240-0000_add-oidc", version: MigrationVersion("202607260802400000") }, DatabaseError(Unknown, "Cannot add a UNIQUE column"))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'main' (16866) panicked at src/main.rs:126:10:
called `Result::unwrap()` on an `Err` value: DatabaseError(UnableToSendCommand, "task 7 panicked with message \"called `Result::unwrap()` on an `Err` value: QueryError(DieselMigrationName { name: \\\"2026-07-26-080240-0000_add-oidc\\\", version: MigrationVersion(\\\"202607260802400000\\\") }, DatabaseError(Unknown, \\\"Cannot add a UNIQUE column\\\"))\"")

Diesel retrieves an error while initializing the database.

@Bnyro

Bnyro commented Jul 26, 2026

Copy link
Copy Markdown
Member Author
thread 'tokio-rt-worker' (21957) panicked at src/main.rs:122:53:
called `Result::unwrap()` on an `Err` value: QueryError(DieselMigrationName { name: "2026-07-26-080240-0000_add-oidc", version: MigrationVersion("202607260802400000") }, DatabaseError(Unknown, "Cannot add a UNIQUE column"))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'main' (16866) panicked at src/main.rs:126:10:
called `Result::unwrap()` on an `Err` value: DatabaseError(UnableToSendCommand, "task 7 panicked with message \"called `Result::unwrap()` on an `Err` value: QueryError(DieselMigrationName { name: \\\"2026-07-26-080240-0000_add-oidc\\\", version: MigrationVersion(\\\"202607260802400000\\\") }, DatabaseError(Unknown, \\\"Cannot add a UNIQUE column\\\"))\"")

Diesel retrieves an error while initializing the database.

Oh, sorry for that. I added the UNIQUE constraint after testing everything and didn't re-run the migrations, I thought it would work like that...

For testing it's sufficient to just remove the UNIQUE consteaint for now.

@sourcenix

Copy link
Copy Markdown
Contributor

LGTM

Comment thread src/handlers/user.rs Outdated
Comment thread config.dev.toml
Comment thread README.md Outdated
Comment thread src/handlers/user.rs Outdated
Comment thread src/oidc.rs Outdated
@Bnyro

Bnyro commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

Thanks for the reviews everyone 👍

@Bnyro
Bnyro merged commit b1d4456 into main Jul 30, 2026
10 checks passed
@Bnyro
Bnyro deleted the oidc branch July 30, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants