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

Add support for FedCM, Passkey, and WebAuthn well-known files #158

Merged
merged 24 commits into from
Feb 11, 2025
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c971865
updated /.well-known/assetlinks.json parsing
tsunoyu Jan 15, 2025
395e4f1
updated /.well-known/assetlinks.json parsing and test URLs
tsunoyu Jan 16, 2025
2fadd37
Merge branch 'main' into main
tunetheweb Jan 16, 2025
6ee4f15
Update .markdown-lint.yml
tunetheweb Jan 16, 2025
5a38cf7
Merge branch 'main' into main
tunetheweb Jan 16, 2025
4c8459f
Merge branch 'main' into main
tunetheweb Jan 16, 2025
c8ca4d2
Update pull_request_template.md
tunetheweb Jan 16, 2025
a9919fa
Update pull_request_template.md
tunetheweb Jan 16, 2025
13e6e91
Update wpt-test.yml
tunetheweb Jan 16, 2025
1e88c1f
Merge branch 'HTTPArchive:main' into update-wellknown-features
tsunoyu Feb 4, 2025
3819a91
FedCM, passkey, Related Origin Requests
tsunoyu Feb 4, 2025
0e39809
passkey metric
tsunoyu Feb 4, 2025
ee01cd6
Update dist/well-known.js
tunetheweb Feb 4, 2025
41f633e
Update .github/pull_request_template.md
tunetheweb Feb 4, 2025
934c9bf
Restore example.com
tunetheweb Feb 4, 2025
116938f
Merge branch 'main' into update-wellknown-features
tunetheweb Feb 4, 2025
f222677
Update assetlink.json relation to check array to correctly reflect th…
tsunoyu Feb 5, 2025
ce62a09
Restore test website example.com
tsunoyu Feb 5, 2025
d6c5dbe
correct lint error for .github/pull_request_template.md
tsunoyu Feb 5, 2025
8227d3b
Update /.well-known/web-identity error handling
tsunoyu Feb 5, 2025
22329b9
Update /.well-known/passkey-endpoints error handling
tsunoyu Feb 5, 2025
b158dc8
Update /.well-known/webauthn error handling
tsunoyu Feb 5, 2025
113ec42
Removed redundant properties
tsunoyu Feb 6, 2025
43ed0e5
Update responding with default results.
tsunoyu Feb 7, 2025
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
56 changes: 54 additions & 2 deletions dist/well-known.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ return Promise.all([
let hasDeepLinking = false;
let hasCredentialSharing = false;
data.forEach(statement => {
if (statement.relation === 'delegate_permission/common.handle_all_urls') {
if (statement.relation.includes('delegate_permission/common.handle_all_urls')) {
hasDeepLinking = true;
} else if (statement.relation === 'delegate_permission/common.get_login_creds') {
}
if (statement.relation.includes('delegate_permission/common.get_login_creds')) {
hasCredentialSharing = true;
}
});
Expand All @@ -115,6 +116,57 @@ return Promise.all([
return data;
});
}),
// FedCM
parseResponse('/.well-known/web-identity', r => {
return r.text().then(text => {
let result = {
provider_urls: [],
accounts_endpoint: null,
login_url: null
};
try {
let data = JSON.parse(text);
result.provider_urls = Array.isArray(data.provider_urls) && data.provider_urls.length > 0 ? data.provider_urls : [];
result.accounts_endpoint = data.accounts_endpoint || null;
result.login_url = data.login_url || null;
} catch (e) {
// Failed to parse JSON
}
return result;
});
}),
// Passkey
parseResponse('/.well-known/passkey-endpoints', r => {
return r.text().then(text => {
let result = {
enroll: null,
manage: null
};
try {
let data = JSON.parse(text);
result.enroll = data.enroll || null;
result.manage = data.manage || null;
} catch (e) {
// Failed to parse JSON
}
return result;
});
}),
// Related Origin Requests
parseResponse('/.well-known/webauthn', r => {
return r.text().then(text => {
let result = {
origins: []
};
try {
let data = JSON.parse(text);
result.origins = Array.isArray(data.origins) && data.origins.length > 0 ? data.origins : [];
} catch (e) {
// Failed to parse JSON
}
return result;
});
}),
// security
parseResponse('/robots.txt', r => {
return r.text().then(text => {
Expand Down