Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
@magic-ext/oauth
Advanced tools
Readme
We suggest use OAUTH2
@magic-ext/oauth2
package for the best performance
With the Magic JavaScript SDK OAuth extension, you can plug into your favorite social login providers with one, easy-to-use API.
License · Changelog · Contributing Guide
See the developer documentation to learn how to get started with OAuth in Magic SDK.
Integrating your app with OAuth will require our client-side NPM package and OAuth extension:
# Via NPM:
npm install --save magic-sdk @magic-ext/oauth
# Via Yarn:
yarn add magic-sdk @magic-ext/oauth
Alternatively, you can load via CDN with by adding a script tag to your app’s <head>
:
<script src="https://cdn.jsdelivr.net/npm/magic-sdk/dist/magic.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@magic-ext/oauth/dist/extension.js"></script>
Sign up or log in to the developer dashboard to receive API keys that will allow your application to interact with Magic's authentication APIs.
Then, you can start authenticating users with just two method calls!
From your login page:
import { Magic } from 'magic-sdk';
import { OAuthExtension } from '@magic-ext/oauth';
const magic = new Magic('YOUR_API_KEY', {
extensions: [new OAuthExtension()]
});
await magic.oauth.loginWithRedirect({
provider: 'google' | 'facebook' | 'github' | ...
});
From your OAuth callback page:
import { Magic } from 'magic-sdk';
import { OAuthExtension } from '@magic-ext/oauth';
const magic = new Magic('YOUR_API_KEY', {
extensions: [new OAuthExtension()]
});
const res = await magic.oauth.getRedirectResult();
// Then you can access a user's Magic DID token, OAuth access token,
// OpenID Connect profile information, and more!
res.magic.idToken;
res.oauth.accessToken;
res.oauth.userInfo;
FAQs
Magic SDK OAuth Extension for Web environments.
We found that @magic-ext/oauth demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 25 open source maintainers 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.