
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
auth-solid
Advanced tools
Recommended to use [create-jd-app](https://github.com/OrJDev/create-jd-app)
Recommended to use create-jd-app
npm install auth-solid@latest @auth/core@latest
Generate auth secret, then set it as an environment variable:
export AUTH_SECRET=your-secret
export AUTH_TRUST_HOST=true
in this example we are using github so make sure to set the following environment variables:
export GITHUB_ID=your-github-id
export GITHUB_SECRET=your-github-secret
Now create a file called routes/api/auth/[...solidauth].ts
with the following content:
// routes/api/auth/[...solidauth].ts
import { type ISolidAuthHandlerOpts, SolidAuth } from "auth-solid/dist/handler";
import GitHub from "@auth/core/providers/github";
import { serverEnv } from "~/env/server";
export const authOpts: ISolidAuthHandlerOpts = {
providers: [
GitHub({
clientId: process.env.GITHUB_ID,
clientSecret: process.env.GITHUB_SECRET,
}),
],
failureRedirect: "/",
debug: false,
};
const handler = SolidAuth(authOpts);
export const GET = handler;
export const POST = handler;
import { signIn, signOut } from "auth-solid/dist/utils";
const login = () => signIn("github");
const logout = () => signOut();
import { getSession } from "auth-solid/dist/session";
import { createServerData$ } from "solid-start/server";
import { authOpts } from "~/routes/api/auth/[...solidauth]";
export const useSession = () => {
return createServerData$(
async (_, { request }) => {
return await getSession(request, authOpts);
},
{ key: () => ["auth_user"] }
);
};
// useSession is a resource:
const session = useSession();
const loading = session.loading;
const user = () => session()?.user;
FAQs
Recommended to use [create-jd-app](https://github.com/OrJDev/create-jd-app)
The npm package auth-solid receives a total of 0 weekly downloads. As such, auth-solid popularity was classified as not popular.
We found that auth-solid demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.