mirror of https://github.com/actions/toolkit
456cf5a97f | ||
---|---|---|
.. | ||
__tests__ | ||
dist | ||
src | ||
LICENSE.md | ||
README.md | ||
package-lock.json | ||
package.json | ||
tsconfig.json |
README.md
@sourav_chanduka/oidc-client
Usage
You can use this package to interact with the github oidc provider.
Get the ID token
Method Name: getIDToken
Inputs
audience : optional
Example:
const core = require('@actions/core');
const id = require('@actions/oidc-client')
async function getID(){
const id_token = await id.getIDToken('client-id', 'client-secret')
const val = `ID token is ${id_token}`
core.setOutput('id_token', id_token);
}
getID()