Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement oidc #628

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
604fa65
Implement oidc
Jeidnx Jun 18, 2023
375ee58
Better Error handling for oidc config
Jeidnx Jun 19, 2023
143711c
Save redirect in state
Jeidnx Jun 19, 2023
18d9317
Show warning message before oidc login
Jeidnx Jun 19, 2023
f4b9dff
Only show warning when not redirecting to configured frontend
Jeidnx Jun 27, 2023
53d9b9d
Merge branch 'master' into oidc
Jeidnx Jul 4, 2023
97889f3
Merge remote-tracking branch 'origin/master' into oidc
FireMasterK Aug 5, 2023
847f80c
Simplify config handling.
FireMasterK Aug 5, 2023
946ac45
Add missing newline.
FireMasterK Aug 5, 2023
0eb2351
Format all code.
FireMasterK Aug 5, 2023
9b7246a
Merge branch 'master' into oidc
Jeidnx Oct 24, 2023
e7f2187
Implement account deletion and cleanup some code
Jeidnx Oct 25, 2023
c1fde37
Refactor oidc logic into UserHandlers
Jeidnx Oct 26, 2023
024435f
Add database migration for username length change.
FireMasterK Oct 26, 2023
470efd8
Revert "Add database migration for username length change."
Jeidnx Oct 29, 2023
5f6a83a
Add code from the meeting.
FireMasterK Oct 29, 2023
868103c
Merge branch 'master' into oidc
Jeidnx Nov 6, 2024
074e4bc
chore: properly implement oidc
Jeidnx Nov 12, 2024
580eb7f
Simplify oidc hash generation.
FireMasterK Nov 17, 2024
9520a3c
Simplify error handling code a little.
FireMasterK Nov 17, 2024
b0725f8
Remove debug code and format.
FireMasterK Nov 17, 2024
74a6751
Move OidcData to db + some cleanup
Jeidnx Nov 20, 2024
f76f8e0
randomize username
Jeidnx Nov 20, 2024
e4ba195
add redirect to oidc delete; more cleanup
Jeidnx Nov 20, 2024
77cd736
explicitly reject empty hashes
Jeidnx Nov 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Show warning message before oidc login
  • Loading branch information
Jeidnx committed Jun 19, 2023
commit 18d93177fbe8009a45379f67734bad6d5d284d45
8 changes: 7 additions & 1 deletion src/main/java/me/kavin/piped/server/ServerLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,13 @@ AsyncServlet mainServlet(Executor executor) {
.nonce(nonce)
.build();

return HttpResponse.redirect302(oidcRequest.toURI().toString());
return HttpResponse.ok200().withHtml(
"<!DOCTYPE html><html style= \"color: white;background: #0f0f0f;\"><body>"
+ "<h3>Warning:</h3> You are trying to give <pre style=\"font-size: 1.2rem;\">"
+ redirectUri
+ "</pre> access to your Piped account. If you wish to continue click <a style=\"text-decoration: underline;color: inherit;\"href=\""
+ oidcRequest.toURI().toString()
+ "\">here</a></body></html>");
}
case "callback" -> {
ClientAuthentication clientAuth = new ClientSecretBasic(provider.clientID, provider.clientSecret);
Expand Down