Skip to content

oauth-client-browser: accept DIDs when preparing login #89

Description

@Kzoeps

Summary

HappyViewBrowserClient.prepareLogin() cannot start OAuth login from a DID.

The method accepts a handle and always passes it to the handle resolver:

https://github.com/gamesgamesgamesgamesgames/happyview/blob/cbed465e5301d59685eea4ad917a599f82e6e92c/packages/oauth-client-browser/src/browser-client.ts#L122-L131

const resolvedDid = await this.handleResolver.resolve(handle)

Passing an identifier such as did:plc:abc therefore attempts handle resolution and fails, even though the client already has a DID resolver for the next step.

Expected behavior

prepareLogin, login, signIn, signInRedirect, and signInPopup should accept either a handle or DID as the login identifier.

Actual behavior

Only handles work. A DID is incorrectly treated as a handle, preventing OAuth login from starting.

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