mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [simple-oauth2] Allow http options for getToken According to the docs of simple-oauth2 the getToken function optionally accepts an httpOptions object: https://www.npmjs.com/package/simple-oauth2#authorization-code-flow ``` // Optional per-call http options const httpOptions = {}; // Save the access token try { const result = await oauth2.authorizationCode.getToken(tokenConfig, httpOptions); const accessToken = oauth2.accessToken.create(result); } catch (error) { console.log('Access Token Error', error.message); } ``` * [simple-oauth2] Allow scope in getToken config According to the docs of simple-oauth2 a scope property is allowed: https://www.npmjs.com/package/simple-oauth2#authorization-code-flow ``` // Get the access token object (the authorization code is given from the previous step). const tokenConfig = { code: '<code>', redirect_uri: 'http://localhost:3000/callback', scope: '<scope>', // also can be an array of multiple scopes, ex. ['<scope1>, '<scope2>', '...'] }; // Optional per-call http options const httpOptions = {}; // Save the access token try { const result = await oauth2.authorizationCode.getToken(tokenConfig, httpOptions); const accessToken = oauth2.accessToken.create(result); } catch (error) { console.log('Access Token Error', error.message); } ``` * [simple-oauth2] Fix missing type for scope * [simple-oauth2] Add http options to all func * [simple-oauth2] Update interface for WreckHttpOptions * [simple-oauth2] bump version to trigger rebuild * [simple-oauth2] Fix build errors Error in simple-oauth2 Error: /home/travis/build/DefinitelyTyped/DefinitelyTyped/types/simple-oauth2/index.d.ts:1:25 ERROR: 1:25 dt-header Error parsing header. Expected: foo MAJOR.MINOR (patch version not allowed). See: https://github.com/Microsoft/dtslint/blob/master/docs/dt-header.md ERROR: 97:11 strict-export-declare-modifiers All declarations in this module are exported automatically. Prefer to explicitly write 'export' for clarity. If you have a good reason not to export this declaration, add 'export {}' to the module to shut off automatic exporting. See: https://github.com/Microsoft/dtslint/blob/master/docs/strict-export-declare-modifiers.md ERROR: 99:13 typedef-whitespace expected nospace before colon in property-declaration ERROR: 110:10 no-any-union Including `any` in a union will override all other members of the union. See: https://github.com/Microsoft/dtslint/blob/master/docs/no-any-union.md |
||
|---|---|---|
| .. | ||
| v1 | ||
| index.d.ts | ||
| simple-oauth2-tests.ts | ||
| tsconfig.json | ||
| tslint.json | ||