mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 14:53:00 +03:00
[PR #270] [MERGED] feat: device authorization endpoint #906
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pocket-id/pocket-id/pull/270
Author: @kmendell
Created: 2/25/2025
Status: ✅ Merged
Merged: 4/25/2025
Merged by: @kmendell
Base:
main← Head:device-code-grant📝 Commits (10+)
42d010bfeat: device authorization endpointbcc2ff2remove my testing69b1c29add device auth endpoint to .well-known controllerdf0cfd2fix duplicate device code db issue26b4559Merge branch 'main' into device-code-grant444486dfix device code token logic, fix audit log args, add new audit log event types70b93adadd allowedUserGroup checksc42a93fremove checkbox from form and set device code to enabled by defaultad36ff5remove un-needed debug logs from testing2230d6aadd scope sharing confirmation, device auth page match exsisting layouts, add return to device message📊 Changes
26 files changed (+777 additions, -79 deletions)
View changed files
📝
backend/internal/common/errors.go(+48 -0)📝
backend/internal/controller/oidc_controller.go(+84 -19)📝
backend/internal/controller/well_known_controller.go(+2 -1)📝
backend/internal/dto/oidc_dto.go(+30 -0)📝
backend/internal/model/audit_log.go(+6 -4)📝
backend/internal/model/oidc.go(+14 -0)📝
backend/internal/service/oidc_service.go(+255 -49)➕
backend/resources/migrations/postgres/20250421221059_add_device_codes.down.sql(+1 -0)➕
backend/resources/migrations/postgres/20250421221059_add_device_codes.up.sql(+12 -0)➕
backend/resources/migrations/sqlite/20250421221059_add_device_codes.down.sql(+1 -0)➕
backend/resources/migrations/sqlite/20250421221059_add_device_codes.up.sql(+12 -0)📝
frontend/messages/en-US.json(+5 -1)📝
frontend/src/hooks.server.ts(+1 -1)📝
frontend/src/lib/components/header/header.svelte(+1 -1)📝
frontend/src/lib/components/scope-item.svelte(+0 -0)➕
frontend/src/lib/components/scope-list.svelte(+27 -0)📝
frontend/src/lib/services/oidc-service.ts(+11 -0)📝
frontend/src/lib/types/oidc.type.ts(+6 -0)📝
frontend/src/routes/authorize/+page.svelte(+1 -1)➕
frontend/src/routes/device/+page.server.ts(+9 -0)...and 6 more files
📄 Description
This took me awhile to figure out but it does work as far as i can see. More of a base layout for the feature as this was my first attempt. It follows the OIDC Spec as well.
Fixes: https://github.com/pocket-id/pocket-id/issues/112
���� This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.