Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.
/ nodes-sso Public archive

Allow users to login using Nodes SSO πŸ”‘

License

Notifications You must be signed in to change notification settings

ml-archive/nodes-sso

Repository files navigation

Admin Panel Nodes SSO πŸ”‘

Swift Version Vapor Version Circle CI codebeat badge codecov Readme Score GitHub license

πŸ“¦ Installation

Update your Package.swift file.

.package(url: "https://github.com/nodes-vapor/admin-panel-nodes-sso.git", .upToNextMinor(from: "0.6.0")),
targets: [
    .target(
        name: "App",
        dependencies: [
            ...
            "AdminPanelNodesSSO"
        ]
    ),
    ...
]

Install resources

Copy the sso-button.leaf file from Resources/Views/AdminPanel/Login/ and the nodes.png from Public/images/ from this repo into your project into the same directories. You can download this repo as a zip and then move the files into the mentioned directories. Remember to check that you're not overwriting any files in your project.

πŸš€ Getting started

import AdminPanelNodesSSO

Add the Provider

try addProvider(AdminPanelNodesSSO.Provider.self)

Embed the Button

Within index.leaf in your Resources/Views/AdminPanel/Login/ insert right after the opening <body> tag:

#embed("AdminPanel/Login/sso-button")

πŸ”§ Configurations

Make sure configs are added to adminpanel-sso-nodes.json:

Key Example value Required Description
redirectUrl http://provider.com/sso/my-web-site Yes The url used for opening up the SSO login.
salt som3Rand0mS4lt Yes The salt to use for the hasher.
loginPath /admin/sso/login No The project path to start the SSO flow.
callbackPath /admin/sso/callback No The project path after user has logged in using SSO.

πŸ† Credits

This package is developed and maintained by the Vapor team at Nodes. The package owner for this project is Steffen.

πŸ“„ License

This package is open-sourced software licensed under the MIT license