UNPKG

react-native-azure-auth

Version:

An React Native module implements Azure AD V2.0 authentication flow

30 lines (27 loc) 618 B
export default class AzureAuthNative { constructor() { this.bundleIdentifier = 'my_bundle_ID' } showUrl(url, closeOnLoad, callback) { this.url = url this.hidden = false if (this.error || closeOnLoad) { callback(this.error) } else { this.onUrl() } } hide() { this.hidden = true } reset() { this.url = null this.error = null this.hidden = true this.parameters = null this.onUrl = () => { } } oauthParameters(callback) { callback(this.parameters) } }