Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/client-sso-oidc

Package Overview
Dependencies
Maintainers
5
Versions
390
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-sso-oidc

AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native

  • 3.297.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.2M
decreased by-81.25%
Maintainers
5
Weekly downloads
 
Created

What is @aws-sdk/client-sso-oidc?

The @aws-sdk/client-sso-oidc package is a client library for AWS Single Sign-On OIDC (OpenID Connect) service. It allows developers to programmatically interact with the AWS SSO OIDC service to create and manage authentication tokens for federated users accessing AWS resources.

What are @aws-sdk/client-sso-oidc's main functionalities?

CreateToken

This feature allows you to create a new token for a registered client. This is typically used to get an access token using a refresh token.

const { SSOOIDCClient, CreateTokenCommand } = require('@aws-sdk/client-sso-oidc');

const client = new SSOOIDCClient({ region: 'us-west-2' });
const command = new CreateTokenCommand({
  clientId: 'exampleClientId',
  clientSecret: 'exampleClientSecret',
  grantType: 'refresh_token',
  refreshToken: 'exampleRefreshToken',
  scope: ['aws.cognito.signin.user.admin']
});

client.send(command).then((response) => {
  console.log(response);
}).catch((error) => {
  console.error(error);
});

RegisterClient

This feature is used to register a new client with AWS SSO OIDC service. It is the first step in setting up the OIDC relationship.

const { SSOOIDCClient, RegisterClientCommand } = require('@aws-sdk/client-sso-oidc');

const client = new SSOOIDCClient({ region: 'us-west-2' });
const command = new RegisterClientCommand({
  clientName: 'exampleClientName',
  clientType: 'public',
  scopes: ['aws.cognito.signin.user.admin']
});

client.send(command).then((response) => {
  console.log(response);
}).catch((error) => {
  console.error(error);
});

StartDeviceAuthorization

This feature initiates the device authorization flow by getting a device code that can be used by end-users to authorize their device.

const { SSOOIDCClient, StartDeviceAuthorizationCommand } = require('@aws-sdk/client-sso-oidc');

const client = new SSOOIDCClient({ region: 'us-west-2' });
const command = new StartDeviceAuthorizationCommand({
  clientId: 'exampleClientId',
  clientSecret: 'exampleClientSecret',
  startUrl: 'https://my-sso-start-url.example.com'
});

client.send(command).then((response) => {
  console.log(response);
}).catch((error) => {
  console.error(error);
});

Other packages similar to @aws-sdk/client-sso-oidc

FAQs

Package last updated on 22 Mar 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc