File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " intuit-oauth" ,
3
- "version" : " 3.0.1 " ,
3
+ "version" : " 3.0.2 " ,
4
4
"description" : " Intuit Node.js client for OAuth2.0 and OpenIDConnect" ,
5
5
"main" : " ./src/OAuthClient.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -108,6 +108,21 @@ OAuthClient.user_agent = `Intuit-OAuthClient-JS_${
108
108
version . version
109
109
} _${ os . type ( ) } _${ os . release ( ) } _${ os . platform ( ) } `;
110
110
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
+
111
126
/**
112
127
* Redirect User to Authorization Page
113
128
* *
You can’t perform that action at this time.
0 commit comments