File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " intuit-oauth" ,
3- "version" : " 3.0.1 " ,
3+ "version" : " 3.0.2 " ,
44 "description" : " Intuit Node.js client for OAuth2.0 and OpenIDConnect" ,
55 "main" : " ./src/OAuthClient.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -108,6 +108,21 @@ OAuthClient.user_agent = `Intuit-OAuthClient-JS_${
108108 version . version
109109} _${ os . type ( ) } _${ os . release ( ) } _${ os . platform ( ) } `;
110110
111+ OAuthClient . prototype . setAuthorizeURLs = function setAuthorizeURLs ( params ) {
112+ // check if the customURL's are passed correctly
113+ if ( ! params ) {
114+ throw new Error ( "Provide the custom authorize URL's" ) ;
115+ }
116+ OAuthClient . authorizeEndpoint = params . authorizeEndpoint ;
117+ OAuthClient . tokenEndpoint = params . tokenEndpoint ;
118+ OAuthClient . revokeEndpoint = params . revokeEndpoint ;
119+ this . environment === 'sandbox'
120+ ? ( OAuthClient . userinfo_endpoint_sandbox = params . userInfoEndpoint )
121+ : ( OAuthClient . userinfo_endpoint_production = params . userInfoEndpoint ) ;
122+
123+ return this ;
124+ } ;
125+
111126/**
112127 * Redirect User to Authorization Page
113128 * *
You can’t perform that action at this time.
0 commit comments