Skip to content

Improve OAuth types #287

@mightymatth

Description

@mightymatth

✅ Prerequisites

  • Did you perform a cursory search of open issues? Is this feature already requested elsewhere?
  • Are you reporting to the correct repository (magic-sdk)?

✨ Feature Request

Either export HiddenExtensionFields interface or create a new one:

export declare class SDKBase {
    auth: Omit<OAuthExtension, HiddenExtensionFields>
}

🧩 Context

When I create a Magic instance:

new Magic({..., extensions: [new OAuthExtension()])

...this returns:

SDKBase & {auth: Omit<OAuthExtension, HiddenExtensionFields>}

Now, if I want to declare this variable, I need to make my own interface or type because HiddenExtensionFields is not exported. It would be nice to export it or have another interface that represents OAuthExtension without hidden fields so API consumers could use it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions