pod-os / PodOS

Personal Online Data Operating System
MIT License
13 stars 1 forks source link

Suggested issuers for login #21

Closed josephguillaume closed 8 months ago

josephguillaume commented 1 year ago

I'm interested in potentially implementing a suggested issuers modal dialog to streamline logging in. At the moment the user has to delete the default text in the prompt box and the paste or type their IDP. SolidOS instead offers a selection of defaults as well as suggesting the current solid storage/host.

I thought I'd start by describing what I think implementation would involve...

In pos-login, create a modal dialog and modify the onClick to display it. https://github.com/pod-os/PodOS/blob/f82809f9c597d582b567c3be43d0664379cab009/elements/src/components/pos-login/pos-login.tsx#L46

This is similar to the pattern used in ‎pos-add-new-thing.

Add corresponding tests that the modal opens and closes.

The modal content itself would be based on the similar feature in solid-ui https://github.com/SolidOS/solid-ui/blob/6c36e7182fc9724f99aa6766d7eef2a32f100bdb/src/login/login.ts#L589

Default issuers would similarly need to be defined somewhere. I'm not sure if it would be in the pos-login component too. Presumably the same ones can be used as in solid-logic https://github.com/SolidOS/solid-logic/blob/main/src/issuer/issuerLogic.ts

Based on the current design, I presume that the user's choice of idpUrl would be set in the store, and the existing function removed. https://github.com/pod-os/PodOS/blob/main/elements/src/store/getIdpUrl.ts

A slightly modified version of the current login would then be called.

https://github.com/pod-os/PodOS/blob/f82809f9c597d582b567c3be43d0664379cab009/elements/src/components/pos-login/pos-login.tsx#L24-L27

The integration spec would also be modified to use the modal dialog https://github.com/pod-os/PodOS/blob/f82809f9c597d582b567c3be43d0664379cab009/elements/src/components/pos-login/pos-login.integration.spec.tsx

Have I missed anything?

Edit: Added checklist

angelo-v commented 1 year ago

Hi @josephguillaume That matches quite well what I had in mind and I appreciate any help on implementing it. Thanks for making the effort in describing your plans so well. I think they go in the right direction. Nevertheless it might be helpful to have a quick call and discuss the ideas in person to make sure we are on the same track. What do you think? We can chat on Matrix to find a timeslot.