andrew-codes / playnite-web

Self-hosted Playnite companion web app; offering remote control, automation, sharing what’s in your library with friends.
GNU Affero General Public License v3.0
16 stars 4 forks source link

feat!: graphql based authentication/authorization #403

Closed andrew-codes closed 1 week ago

andrew-codes commented 1 week ago

Signing in/out now handled by GraphQL /api endpoint. GraphQL endpoint reads an authorization cookie for subsequent graph requests. Both a cookie and HTTP header of authorization: Bearer $token are accepted.

Relates to #318

BREAKING CHANGE: /activate endpoint has been removed. This will be replaced by a GraphQL endpoint.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 0% with 152 lines in your changes missing coverage. Please review.

Project coverage is 6.71%. Comparing base (b25b77c) to head (bc21105). Report is 1 commits behind head on main.

Files Patch % Lines
...e-web/src/server/graphql/modules/auth/api/index.ts 0.00% 32 Missing and 3 partials :warning:
...web/src/server/graphql/modules/user/api/getUser.ts 0.00% 19 Missing :warning:
.../graphql/modules/auth/resolvers/Mutation/signIn.ts 0.00% 16 Missing :warning:
apps/playnite-web/src/server/graphql/index.ts 0.00% 10 Missing and 3 partials :warning:
apps/playnite-web/src/queryHooks/signIn.ts 0.00% 11 Missing :warning:
apps/playnite-web/src/server/graphql/Domain.ts 0.00% 11 Missing :warning:
apps/playnite-web/src/queryHooks/signOut.ts 0.00% 9 Missing :warning:
...graphql/modules/auth/resolvers/Mutation/signOut.ts 0.00% 8 Missing :warning:
.../server/graphql/modules/user/resolvers/Query/me.ts 0.00% 7 Missing :warning:
apps/playnite-web/src/queryHooks/me.ts 0.00% 5 Missing :warning:
... and 7 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #403 +/- ## ======================================== - Coverage 7.46% 6.71% -0.75% ======================================== Files 50 62 +12 Lines 1005 1087 +82 Branches 166 179 +13 ======================================== - Hits 75 73 -2 - Misses 896 976 +80 - Partials 34 38 +4 ``` | [Flag](https://app.codecov.io/gh/andrew-codes/playnite-web/pull/403/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andrew+Smith) | Coverage Δ | | |---|---|---| | [component-tests](https://app.codecov.io/gh/andrew-codes/playnite-web/pull/403/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andrew+Smith) | `14.03% <ø> (ø)` | | | [unit-tests](https://app.codecov.io/gh/andrew-codes/playnite-web/pull/403/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andrew+Smith) | `5.85% <0.00%> (-0.77%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andrew+Smith#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.