File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,9 @@ const OAuthManagerBridge = NativeModules.OAuthManager;
13
13
let configured = false ;
14
14
const STORAGE_KEY = 'ReactNativeOAuth' ;
15
15
import promisify from './lib/promisify'
16
- import authProviders from './lib/authProviders' ;
16
+ import defaultProviders from './lib/authProviders' ;
17
+
18
+ let authProviders = defaultProviders ;
17
19
18
20
const identity = ( props ) => props ;
19
21
/**
@@ -27,6 +29,10 @@ export default class OAuthManager {
27
29
this . _options = opts ;
28
30
}
29
31
32
+ addProvider ( provider ) {
33
+ Object . assign ( { } , authProviders , provider ) ;
34
+ }
35
+
30
36
configure ( providerConfigs ) {
31
37
return this . configureProviders ( providerConfigs )
32
38
}
@@ -99,11 +105,11 @@ export default class OAuthManager {
99
105
// Private
100
106
/**
101
107
* Configure a single provider
102
- *
103
- *
108
+ *
109
+ *
104
110
* @param {string } name of the provider
105
111
* @param {object } additional configuration
106
- *
112
+ *
107
113
**/
108
114
configureProvider ( name , props ) {
109
115
invariant ( OAuthManager . isSupported ( name ) , `The provider ${ name } is not supported yet` ) ;
You can’t perform that action at this time.
0 commit comments