w3c-fedid / login-status

A Web Platform API that allows websites to notify the browser about their users login status
https://w3c-fedid.github.io/login-status/
9 stars 2 forks source link

Add in status indicator extension for Login Status #4

Open pascoej opened 1 month ago

pascoej commented 1 month ago

It can be useful to know the username of the account whenever sites use setStatus. This was present in the fedidcg explainer, but hasn't made it into the spec here yet.

I'm creating this issue because I'd like to consider it for inclusion and plan on opening a PR to allow sites to pass indicator.name and indicator.picture when setting login status.

Example from explainer:

navigator.login.setStatus("logged-in", {
  indicator: {
    name: "John Doe",
    picture: "https://website.com/john-doe/profile.png",
  }
});
samuelgoto commented 1 month ago

plan on opening a PR to allow sites to pass indicator.name and indicator.picture when setting login status.

I am highly supportive and excited about login status indicators, and I'm glad that you are looking at that too! A PR would be highly appreciated.

Some of the early explorations we looked at was to reuse parts of the url bar to indicate that the user is logged in.

Does this match more or less your intuition as to where we would hang a status indicator (obviously, each browser being able to make their own UX determinations independently)?

Screenshot 2024-08-22 at 15 40 23