SAML Login Link
SAML Login Link provides ready-to-use Log in with SAML and Log out with SAML links and tabs for anonymous and authenticated users. The module integrates with the SimpleSAMLphp Authentication module and requires no theming or custom code.
Features
-
Adds a SAML Login tab to the
/userpage for anonymous visitors, along with a configurable block that can be placed in any region, such as the header, footer, or login area. Both options link directly to the SAML login route provided by the SimpleSAMLphp Authentication module. - Adds a SAML Logout tab and block for authenticated users. Unlike Drupal core's Log out link, which only terminates the local Drupal session, the SAML Logout link also initiates logout through the SAML identity provider (IdP), helping maintain consistent sign-out behavior in SSO environments.
-
Allows administrators to configure the link text and CSS classes for both the link (
<a>) and its wrapper (<div>). This makes it possible to match the links to an existing theme without template overrides or custom CSS implementations. - Provides an optional return to current page setting. When enabled, users are returned to the page from which they initiated the SAML login or logout instead of being redirected to the site's default destination.
- Supports site-wide default configuration as well as per-block overrides. Individual block instances can use different link text, CSS classes, and return behavior when required.
- Provides a simple, no-code solution for sites using SimpleSAMLphp-based single sign-on that need configurable SAML login and logout links for both anonymous and authenticated users.
Post-Installation
- Go to Administration > People > Permissions and grant the Administer SAML Login Link settings permission to the roles that should be allowed to manage the module configuration.
-
Go to Administration > Configuration > People > SAML Login Link
(/admin/config/people/saml-login-link) and configure the default login and logout link text, CSS classes, and return-to-page behavior. - Go to Administration > Structure > Block layout and place the SAML Login Link and/or SAML Logout Link blocks in the required regions. Individual block instances can override the site-wide defaults configured in the previous step.
Additional Requirements
-
The SimpleSAMLphp Authentication module must be installed and configured with a working connection to your SAML identity provider. SAML Login Link does not perform SAML authentication itself; it provides links and tabs to the authentication and logout routes supplied by
simplesamlphp_auth. - No additional PHP libraries or external services are required beyond those already required by the SimpleSAMLphp Authentication module.
Recommended Modules
- Login Destination — Useful when you need advanced, rule-based control over the destination users are redirected to after SAML authentication. SAML Login Link provides a simpler option for returning users to the current page.
- External Authentication — Used by the SimpleSAMLphp Authentication module for external authentication and account mapping. It may also be useful when troubleshooting how SAML-authenticated users are associated with Drupal accounts.
Similar Projects
There is no other module specifically focused on providing configurable SAML login and logout tabs and blocks on top of the SimpleSAMLphp Authentication module.
Without this module, site builders typically need to add custom links in a template, create a custom block, or manually configure links to the SAML authentication routes. SAML Login Link provides this functionality through Drupal's configuration and block placement interfaces, without requiring custom code or template overrides.
Supporting this Module
This module is free and open source. You can support its development by using the module, reporting issues and edge cases through the issue queue, and contributing patches or merge requests.
Community Documentation
- SimpleSAMLphp Authentication — Refer to this project for information about configuring the SAML connection and identity provider that this module integrates with.
-
Refer to this module's
README.mdfor the complete installation, configuration, and usage instructions.
Depends on
Dependencies of the latest stable release
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.0 | Stable | 10–11 | Sep 18, 2026 |