How do I customize OAuth2 requests
Passing extra parameters when requesting access
// obtain a reference to the oauth client from the application client
const { oauth } = dpapp
// request a refresh token to be sent
oauth.access('youtrack', {
query: { 'access_type' : 'offline' }
}).then(resp => console.log(resp.refresh_token))Passing extra parameters when refreshing access
// obtain a reference to the oauth client from the application client
const { oauth } = dpapp
// request a refresh token to be sent
oauth.refresh('youtrack', {
query: { 'refresh_token' : 'access-tokens' }
}).then(resp => console.log(resp.access_token))Last updated