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

update demo instructions #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ npm run build
npm run start
```

First you need chrome canary / dev build version > 129 with the `FedCM Authz`, `FedCmMultiIdp` and `FedCM with IdP Registration support` flags enabled in `chrome://flags/`
First you need to use a browser that supports FedCM, such as:
* use Chrome >= 128, go to chrome://flags and enter "fedcm" to filter the flags
* Enable "FedCM with IdP Registration support" and "FedCmMultiIdp"

## On localhost

Expand All @@ -17,15 +19,16 @@ First you need chrome canary / dev build version > 129 with the `FedCM Authz`,
- open a private window
- first go to [http://localhost:3000/.account/](http://localhost:3000/.account/) , click `register IdP to FedCM` and log in with the account created in the previous step
- then go to the client at [http://localhost:6080](http://localhost:6080)
- note: if you try to fetch your profile at `http://localhost:3000/<your_pod_name>/profile/` on step 3. You will get an error, as you need to be logged to access this resource.
- Trigger the Dynamic Client Registration on 1)
- Click the fedcm login button on 2)
- Now try to fetch your profile on 3) again, you should receive the resource without an error.
- under section 3) of the page, edit the textbox so that it has your profile folder `http://localhost:3000/<your_pod_name>/profile/` instead of `http://localhost:3000/a/profile/`
- confirm that 'Fetch resource' results in a 401 error.
- under section 2) of the page, click the fedcm login button. It will offer to log you in as 'John Doe', but with your WebID from the previous step.
- confirm that your WebID and an access token appear.
- click 'Fetch resource' again. It should display an `ldp:Container` description

## hosted

if the client and CSS don't have the same domain or subdomain, the current CSS instance in `./packages/fedcm-component/` won't work because of the `SameSite=None` cookie policiy of FedCM.
Please refere to [this repo](https://github.com/thhck/fedcm-css-exp) instead
Please refer to [this repo](https://github.com/thhck/fedcm-css-exp) instead

# demo

Expand Down
2 changes: 1 addition & 1 deletion packages/client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2> 2. Login </h2>
<input id="token" />
</p>
<h2> 3. Fetch a protected resource </h2>
<input id="target" />
<input id="target" size="40" />
<button id="fetch">Fetch Resource</button>
<h2>Response</h2>
<div id="response" ></div>
Expand Down