Auth
Authentication helper functions
Helper functions for authentication flows.
Package
@tetherto/mdk-ui-foundation
Utilities
@tetherto/mdk-ui-foundation
Import the public APIs on this page from @tetherto/mdk-ui-foundation.
extractAuthTokenFromUrl
Extract ?authToken= from a URL search string. Accepts either a full URL, a query string with leading ?, or a bare query string.
Function
(search: string) => string | nullgatewayRedirectAuth
Build the mining Gateway auth provider.
Function
(options: GatewayRedirectAuthOptions = {}) => AuthProviderstripAuthTokenFromUrl
Build a URL string with the ?authToken= parameter stripped. Used after the OAuth callback to remove the token from the address bar without losing any other query state.
Function
(search: string) => string