Skip to content

Handling automatic WebLN login #48

@adambor

Description

@adambor

Some wallets (like Alby) allow you to enable automatic website logins. Is there any way to detect that and log the user in automatically (call requestProvider) in that case?

One way is to save whether the user used a WebLN wallet last time he was on the website (and save it to the local storage). Then try to call requestProvider when he visits next time, but in this case when user doesn't have the automatic logins enabled it will just annoyingly pop up his wallet.

A fix could be a parameter in the requestProvider method (something like "noPopup"), which would return the provider only if it doesn't require popping up (otherwise returns null or throws), then one can try calling that on page load to see if any provider is "connected" to the website already without annoying the user with a pop up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions