File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 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;
1313let configured = false ;
1414const STORAGE_KEY = 'ReactNativeOAuth' ;
1515import promisify from './lib/promisify'
16- import authProviders from './lib/authProviders' ;
16+ import defaultProviders from './lib/authProviders' ;
17+
18+ let authProviders = defaultProviders ;
1719
1820const identity = ( props ) => props ;
1921/**
@@ -27,6 +29,10 @@ export default class OAuthManager {
2729 this . _options = opts ;
2830 }
2931
32+ addProvider ( provider ) {
33+ Object . assign ( { } , authProviders , provider ) ;
34+ }
35+
3036 configure ( providerConfigs ) {
3137 return this . configureProviders ( providerConfigs )
3238 }
@@ -99,11 +105,11 @@ export default class OAuthManager {
99105 // Private
100106 /**
101107 * Configure a single provider
102- *
103- *
108+ *
109+ *
104110 * @param {string } name of the provider
105111 * @param {object } additional configuration
106- *
112+ *
107113 **/
108114 configureProvider ( name , props ) {
109115 invariant ( OAuthManager . isSupported ( name ) , `The provider ${ name } is not supported yet` ) ;
You can’t perform that action at this time.
0 commit comments