Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
axios-oauth-client
Advanced tools
OAuth 2.0 client utils for axios
With NPM:
$ npm install --save axios-oauth-client axios
With Yarn:
$ yarn add axios-oauth-client axios
import axios from 'axios'
import oauth from 'axios-oauth-client'
const getAuthorizationCode = oauth.authorizationCode(
axios.create(),
'https://oauth.com/2.0/token', // OAuth 2.0 token endpoint
'CLIENT_ID',
'CLIENT_SECRET',
'https://your-app.com/oauth-redirect' // Redirect URL for your app
)
const auth = await getAuthorizationCode('AUTHORIZATION_CODE', 'OPTIONAL_SCOPES')
// => { "access_token": "...", "expires_in": 900, ... }
import axios from 'axios'
import oauth from 'axios-oauth-client'
const getOwnerCredentials = oauth.ownerCredentials(
axios.create(),
'https://oauth.com/2.0/token', // OAuth 2.0 token endpoint
'CLIENT_ID',
'CLIENT_SECRET'
)
const auth = await getOwnerCredentials('USERNAME', 'PASSWORD', 'OPTIONAL_SCOPES')
// => { "access_token": "...", "expires_in": 900, ... }
import axios from 'axios'
import oauth from 'axios-oauth-client'
const getClientCredentials = oauth.clientCredentials(
axios.create(),
'https://oauth.com/2.0/token',
'CLIENT_ID',
'CLIENT_SECRET'
)
const auth = await getClientCredentials('OPTIONAL_SCOPES')
// => { "access_token": "...", "expires_in": 900, ... }
import axios from 'axios'
import oauth from 'axios-oauth-client'
const getRefreshToken = oauth.refreshToken(
axios.create(),
'https://oauth.com/2.0/token',
'CLIENT_ID',
'CLIENT_SECRET'
)
const auth = await getRefreshToken('REFRESH_TOKEN', 'OPTIONAL_SCOPES')
// => { "access_token": "...", "refresh_token": "...", "expires_in": 900, ... }
MIT
FAQs
OAuth 2.0 client utils for axios
The npm package axios-oauth-client receives a total of 0 weekly downloads. As such, axios-oauth-client popularity was classified as not popular.
We found that axios-oauth-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.