
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@userhub/gcip-functions
Advanced tools
Helper functions for the UserHub Google Cloud Identity Platform (Firebase Authentication) connection.
const { UserHubFunctions } = require("@userhub/gcip-functions");
const { runWith } = require("firebase-functions/v1");
const { defineSecret, defineString } = require("firebase-functions/params");
const API_KEY = defineSecret("USERHUB_API_KEY");
const CONNECTION_ID = defineString("USERHUB_CONNECTION_ID");
const functions = new UserHubFunctions({
apiKey: API_KEY,
connectionId: CONNECTION_ID,
});
exports.onCreate = runWith({
memory: "128MB",
secrets: [API_KEY],
})
.auth.user()
.onCreate(functions.onCreate);
exports.onDelete = runWith({
memory: "128MB",
secrets: [API_KEY],
})
.auth.user()
.onDelete(functions.onDelete);
There is also support for the blocking beforeSignIn
function which
ensures the user exists in UserHub before the sign-in process
completes.
Enabling this function adds latency to the sign-in flow and requires that your Firebase project be updated to Firebase Authentication with Identity Platform.
exports.beforeSignIn = runWith({
memory: "128MB",
minInstances: 1,
secrets: [API_KEY],
})
.auth.user()
.beforeSignIn(functions.beforeSignIn);
FAQs
Google Cloud Identity Platform
The npm package @userhub/gcip-functions receives a total of 4 weekly downloads. As such, @userhub/gcip-functions popularity was classified as not popular.
We found that @userhub/gcip-functions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.