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"
]
),
...
]
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.
import AdminPanelNodesSSO
try addProvider(AdminPanelNodesSSO.Provider.self)
Within index.leaf
in your Resources/Views/AdminPanel/Login/
insert right after the opening <body>
tag:
#embed("AdminPanel/Login/sso-button")
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. |
This package is developed and maintained by the Vapor team at Nodes. The package owner for this project is Steffen.
This package is open-sourced software licensed under the MIT license