https://github.com/webdna/id.me
https://github.com/webdna/id.me
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/webdna/id.me
- Owner: webdna
- License: other
- Created: 2022-10-21T09:11:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-13T15:00:25.000Z (about 2 years ago)
- Last Synced: 2025-06-26T01:05:02.604Z (12 months ago)
- Language: PHP
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README

ID.me Verification
## Requirements
This plugin requests Craft 4.x and Craft Commerce 4.x
## Installation
You can install this plugin from the Plugin Store or with Composer.
#### From the Plugin Store
Go to the Plugin Store in your project’s Control Panel and search for “ID.me”. Then click on the “Install” button in its modal window.
#### With Composer
Open your terminal and run the following commands:
```bash
# go to the project directory
cd /path/to/my-project
# tell Composer to load the plugin
composer require webdna/idme
# tell Craft to install the plugin
./craft install/plugin idme
```
## Setup
Create an app on ID.me (https://developers.id.me/organizations), use the callback url specified in the plugin settings for your app redirect url.
Once the app is created and the groups selected, then enter the Client ID & Client Secret (environmental variable are recommended) in the plugin settings.
Also specify which groups (in the plugin settings) you want to be able to verify. These cannot be ones that have not be selected in your ID.me app.
Once these groups are selected, then go to discounts and you will see a "Verified Groups" tabs in which you can selected which group will have this discount applied.
## Usage
Add the verify with ID.me button to your page (usually the cart page) by using the following code:
```twig
{{ craft.idme.renderVerifyButton(number, text, mode, redirectUrl)|raw }}
```
### Parameters
`number` : the cart number
`text` : the text displayed above the button
`mode` : 'popup' or 'fullpage' (default: 'popup')
`redirectUrl` : the url to the page after verification, usually the same as the button. Only used and required if `mode` is `fullpage`
## Basic Example
```twig
{{ craft.idme.renderVerifyButton(cart.number, 'Military members receive 10% off with ID.me')|raw }}
```