Skip to content

Shortcodes

Tim Nolte edited this page Sep 13, 2022 · 2 revisions

Shortcodes

Login Button - [openid_connect_generic_login_button]

This will place a link on the page with some simple styling.

Attributes

Most parts of the login URL generated with the button/link are configurable as shodrtcode attributes, but it's uncommon to need to modify more than just the redirect_to attribute. Any attribute not provided in the shortcode will use the plugin settings.

  • button_text - Change the text of the button.
  • endpoint_login - IDP login endpoint
  • scope - Authorization scopes
  • client_id - Client ID
  • redirect_uri - The WordPress URI the IDP uses to authenticate the request
  • redirect_to - After login, where the visitor should be redirected to on the WordPress site

Example

[openid_connect_generic_login_button button_text="My custom button"]

Login URL - [openid_connect_generic_auth_url]

For great styling flexibility, this shortcode will provide just the login URL.

Attributes

Most parts of the login URL are configurable as shodrtcode attributes, but it's uncommon to need to modify more than just the redirect_to attribute. Any attribute not provided in the shortcode will use the plugin settings.

  • endpoint_login - IDP login endpoint
  • scope - Authorization scopes
  • client_id - Client ID
  • redirect_uri - The WordPress URI the IDP uses to authenticate the request
  • redirect_to - After login, where the visitor should be redirected to on the WordPress site

Example

<a href="[openid_connect_generic_auth_url redirect_to='/some-page-on-the-wordpress-site/']">Login</a>