René's URL Explorer Experiment


Title: OAuth 2.0 authorize/token flow by melvincarvalho · Pull Request #161 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub

Open Graph Title: OAuth 2.0 authorize/token flow by melvincarvalho · Pull Request #161 · JavaScriptSolidServer/JavaScriptSolidServer

X Title: OAuth 2.0 authorize/token flow by melvincarvalho · Pull Request #161 · JavaScriptSolidServer/JavaScriptSolidServer

Description: Summary Adds GET /oauth/authorize — login/consent page for Mastodon clients and remoteStorage apps Adds POST /oauth/authorize — validates credentials via existing authenticate(), generates one-time auth code, redirects back to client Adds POST /oauth/token — exchanges auth code for Bearer token via existing createToken() Auth skip added for /oauth/authorize and /oauth/token in server.js Reuses existing infrastructure: Account system (authenticate() from src/idp/accounts.js) — no new auth code Token system (createToken() from src/auth/token.js) — HMAC-signed Bearer tokens already verified by getWebIdFromRequestAsync() Client registration (getClient() from src/ap/routes/mastodon.js) — validates client_id from Step 1 ~208 lines. No new dependencies. Motivation One OAuth flow unlocks three ecosystems: Mastodon clients (Elk, Phanpy, Ice Cubes) — complete the login flow started by #159 remoteStorage apps (100+ apps) — OAuth Phase 2 of #106 Third-party pane auth — any external app/pane needing user authorization Flow 1. Client registers: POST /api/v1/apps → {client_id, client_secret} 2. Client redirects to: GET /oauth/authorize?client_id=X&redirect_uri=Y&scope=read 3. User logs in: POST /oauth/authorize → redirect to Y?code=CODE 4. Client exchanges: POST /oauth/token {grant_type=authorization_code, code, client_id, ...} 5. Server returns: {access_token, token_type: "Bearer", scope} 6. Client uses: Authorization: Bearer Test plan POST /api/v1/apps to register client GET /oauth/authorize shows login page with client name Login with wrong credentials shows error Login with correct credentials redirects with ?code= POST /oauth/token exchanges code for Bearer token Code is one-time use (second exchange fails) Expired codes (>10 min) are rejected Bearer token works with existing Authorization: Bearer verification Elk/Phanpy can complete OAuth login flow Closes #160 Refs #106, #158, #159

Open Graph Description: Summary Adds GET /oauth/authorize — login/consent page for Mastodon clients and remoteStorage apps Adds POST /oauth/authorize — validates credentials via existing authenticate(), generates one-tim...

X Description: Summary Adds GET /oauth/authorize — login/consent page for Mastodon clients and remoteStorage apps Adds POST /oauth/authorize — validates credentials via existing authenticate(), generates one-tim...

Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:423c48cc-f905-5e12-4d46-8394ff33773f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8C16:2CA452:12BBA3F:17CD5BC:6B039767
html-safe-nonce1a3650108cff41e8357f3c2364001cd7da11c390be63594acd35e3db0ea3956e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzE2OjJDQTQ1MjoxMkJCQTNGOjE3Q0Q1QkM6NkIwMzk3NjciLCJ2aXNpdG9yX2lkIjoiMzE5NTA0MTA5ODMwMTE1MTA3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc10546bb9e6288336c1ad7b36d4220a2501e12c32549976a6c73fa8f13751693
hovercard-subject-tagpull_request:3376674229
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
twitter:imagehttps://avatars.githubusercontent.com/u/65864?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/65864?s=400&v=4
og:image:altSummary Adds GET /oauth/authorize — login/consent page for Mastodon clients and remoteStorage apps Adds POST /oauth/authorize — validates credentials via existing authenticate(), generates one-tim...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git
octolytics-dimension-user_id205442424
octolytics-dimension-user_loginJavaScriptSolidServer
octolytics-dimension-repository_id958025407
octolytics-dimension-repository_nwoJavaScriptSolidServer/JavaScriptSolidServer
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id958025407
octolytics-dimension-repository_network_root_nwoJavaScriptSolidServer/JavaScriptSolidServer
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJavaScriptSolidServer%2FJavaScriptSolidServer%2Fpull%2F161%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJavaScriptSolidServer%2FJavaScriptSolidServer%2Fpull%2F161%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=JavaScriptSolidServer%2FJavaScriptSolidServer
Reloadhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
Reloadhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
Reloadhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
JavaScriptSolidServerhttps://github.com/JavaScriptSolidServer
JavaScriptSolidServerhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer
Codehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer
Issues165 (165)https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues
Pull requests14 (14)https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pulls
Actionshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/actions
Projectshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/projects
Security and qualityhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/security
Insightshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/insights
Sign up for GitHub https://github.com/signup?return_to=%2FJavaScriptSolidServer%2FJavaScriptSolidServer%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FJavaScriptSolidServer%2FJavaScriptSolidServer%2Fissues%2Fnew%2Fchoose
melvincarvalhohttps://github.com/melvincarvalho
gh-pageshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/tree/gh-pages
feature/oauth-flowhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/tree/feature/oauth-flow
Conversation 18 https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161
Commits 4 https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/commits
Checks 0 https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/checks
Files changed https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
Please reload this pagehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
OAuth 2.0 authorize/token flow https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#top
Show all changes 4 commits https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
8b5e2a5 Add OAuth 2.0 authorize/token flow melvincarvalho Mar 10, 2026 https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/commits/8b5e2a5df0860ffc615d602051f1f5fa4eedb728
ea83906 Harden OAuth flow: validate client credentials and redirect_uri melvincarvalho Mar 10, 2026 https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/commits/ea8390655adfc4c2da4416f1389dc41c0fac94c4
62665aa Add state parameter, timing-safe comparison, rate limiting melvincarvalho Mar 10, 2026 https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/commits/62665aa60b2d58e206171e2943974e0194e1d666
69225fa Consume auth code before validation, rate limit token endpoint melvincarvalho Mar 10, 2026 https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/commits/69225fa3c02073de54871b8fbc807c69ea32f348
Clear filters https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
Please reload this pagehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
Please reload this pagehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
index.js https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#diff-1db44e136fde3055a0e634ad9e1c5e55c7499b47ed2be3730476c31ade9c305b
oauth.js https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#diff-3f221113cf5e3a99950d9ae3957f5950eb03fa332d2916df2b69151038b32244
server.js https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#diff-79f4c7cdc0b026f6e556196f5911a449157807cffdb3f9d33f0b5404b4ffc2f3
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/blob/gh-pages/.github/CODEOWNERS#L12
src/ap/index.jshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#diff-1db44e136fde3055a0e634ad9e1c5e55c7499b47ed2be3730476c31ade9c305b
View file https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/blob/69225fa3c02073de54871b8fbc807c69ea32f348/src/ap/index.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/{{ revealButtonHref }}
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#diff-1db44e136fde3055a0e634ad9e1c5e55c7499b47ed2be3730476c31ade9c305b
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#diff-1db44e136fde3055a0e634ad9e1c5e55c7499b47ed2be3730476c31ade9c305b
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#diff-1db44e136fde3055a0e634ad9e1c5e55c7499b47ed2be3730476c31ade9c305b
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/blob/gh-pages/.github/CODEOWNERS#L12
src/ap/routes/oauth.jshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#diff-3f221113cf5e3a99950d9ae3957f5950eb03fa332d2916df2b69151038b32244
View file https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/blob/69225fa3c02073de54871b8fbc807c69ea32f348/src/ap/routes/oauth.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/{{ revealButtonHref }}
Copilothttps://github.com/apps/copilot-pull-request-reviewer
Mar 10, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#r2909317411
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
Copilothttps://docs.github.com/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review
Copilothttps://github.com/apps/copilot-pull-request-reviewer
Mar 10, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#r2909344320
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
Copilothttps://docs.github.com/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review
Copilothttps://github.com/apps/copilot-pull-request-reviewer
Mar 10, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#r2909380509
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
Copilothttps://docs.github.com/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review
Copilothttps://github.com/apps/copilot-pull-request-reviewer
Mar 10, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#r2909344361
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
Copilothttps://docs.github.com/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review
Copilothttps://github.com/apps/copilot-pull-request-reviewer
Mar 10, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#r2909317391
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
Copilothttps://docs.github.com/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review
Copilothttps://github.com/apps/copilot-pull-request-reviewer
Mar 10, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#r2909317419
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
Copilothttps://docs.github.com/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review
Copilothttps://github.com/apps/copilot-pull-request-reviewer
Mar 10, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#r2909344341
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files
Copilothttps://docs.github.com/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/blob/gh-pages/.github/CODEOWNERS#L12
src/server.jshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#diff-79f4c7cdc0b026f6e556196f5911a449157807cffdb3f9d33f0b5404b4ffc2f3
View file https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/blob/69225fa3c02073de54871b8fbc807c69ea32f348/src/server.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/{{ revealButtonHref }}
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#diff-79f4c7cdc0b026f6e556196f5911a449157807cffdb3f9d33f0b5404b4ffc2f3
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/161/files#diff-79f4c7cdc0b026f6e556196f5911a449157807cffdb3f9d33f0b5404b4ffc2f3
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.