magic-js
magic-js copied to clipboard
Improve OAuth types
✅ Prerequisites
- [x] Did you perform a cursory search of open issues? Is this feature already requested elsewhere?
- [x] 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.
@mightymatth, our apologies for the delay in responding to this issue. I wanted to let you know that this items has been recorded and will be reviewed by our team for roadmap consideration. Thank you for the feature request, it's highly appreciated!
Hey @mightymatth, I would love to better understand your use case. Are you looking to implement the OAuth extension within the auth namespace, such as using magic.auth.loginWithRedirect? If that's not the case, could you provide more details about your specific scenario?