![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@i-360/auth-ui
Advanced tools
Package for authenticating a user using their Koch ID
git clone git@gitlab.com:i-360/dataops/auth-ui.git
pnpm install
(from repo root directory)pnpm example
The package is published to the NPM registry and can be installed with your preferred package manager:
npm i @i-360/auth-ui
yarn add @i-360/auth-ui
pnpm add @i-360/auth-ui
After installing, import the Auth class into the application and initialize it. Then call the login method.
user<Object|undefined>
=> The user object or undefined when not logged in (getter only, can not be set)token<string|undefined>
=> The users token or undefined when not logged in (getter only, can not be set)login<function>
=> Start the login flow for the userlogout<function>
=> Log a user out of the applicationstatus<function>
=> Check the login status of the Userexpired<function>
=> Validate if the user token is expiredonToken<function>
=> Should be called with the idToken from within the pop-window when redirecteddecode<function>
=> Helper for decoding JWT tokens (Not commonly used)Example
// Initialize the Auth class
const auth = new Auth({
// URL used to login the user
loginUrl: `https://example.i-360.com/kochid/login`,
// URL used to logout the user
logoutUrl: `https://example.i-360.com/kochid/logout`,
// URL to redirect to once authenticated
redirectUri: `my-application.com`,
// Login callback called when the user is logged in
onLogin: (user, token) => { /* Handle user and token */ },
// Error callback called when the there is an error during authentication
onError: (error) => { /* Handle authentication error */ },
// Logout callback called when the user is logged out
onLogout: () => { /* Handle User logout */ },
})
// Call the login method to log the user into the application
// Calls the passed in `onLogin` callback after logging in the user
await auth.login()
// Get the current user or token, both are undefined if not logged in
const user = auth.user
const token = auth.token
// Setting the user or token manually will NOT work. A warning will be printed to the console
auth.user = {}
auth.token = `custom-token`
// Check if the token is expired, returned false if no user or token, or the token is expired
const isExpired = auth.expired()
// Call the logout method to log the user out of the application
// Calls the passed in `onLogout` callback after logging out the user
auth.logout()
FAQs
i360 Auth UI
The npm package @i-360/auth-ui receives a total of 0 weekly downloads. As such, @i-360/auth-ui popularity was classified as not popular.
We found that @i-360/auth-ui 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.