This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
radiusdesk:login_pages:otp [2023/01/25 20:31] admin [OTP For Click To Connect] |
radiusdesk:login_pages:otp [2023/01/26 01:44] (current) admin [Enable System To Send OTPs] |
||
---|---|---|---|
Line 4: | Line 4: | ||
* A user will typically provide a **mobile number** or **email address**. | * A user will typically provide a **mobile number** or **email address**. | ||
* The system will then send a code to the mobile number using SMS or to the email address using an email. | * The system will then send a code to the mobile number using SMS or to the email address using an email. | ||
- | * This code will be used to by the user to validate itself to the system. | + | * This code will be used by the user to validate itself to the system. |
* As for February 2023 RADIUSdesk includes support for OTP verification for Captive Portal (Hotspot) users. | * As for February 2023 RADIUSdesk includes support for OTP verification for Captive Portal (Hotspot) users. | ||
* We support the following ways to send the OTP: | * We support the following ways to send the OTP: | ||
Line 16: | Line 16: | ||
===== Enable System To Send OTPs ===== | ===== Enable System To Send OTPs ===== | ||
* In order for RADIUSdesk to send an OTP you have to configure the system to be able to send the OTP using email or SMS. | * In order for RADIUSdesk to send an OTP you have to configure the system to be able to send the OTP using email or SMS. | ||
- | * RADIUSdesk allows for you to configure a system wide configuration but it also allows you to define per cloud setting | + | * RADIUSdesk allows for you to configure a system wide configuration but it also allows you to define per cloud settings |
* See the following screenshot for the email configuration: | * See the following screenshot for the email configuration: | ||
{{: | {{: | ||
Line 59: | Line 59: | ||
* If you select SMS option (the user's mobile number) you don't need to provide anything since the OTP will be delivered as an SMS. | * If you select SMS option (the user's mobile number) you don't need to provide anything since the OTP will be delivered as an SMS. | ||
* We also again added a link in the email for the user to conveniently confirm the OTP by clicking on the link. | * We also again added a link in the email for the user to conveniently confirm the OTP by clicking on the link. | ||
+ | |||
+ | ===== Some Technical Items ===== | ||
+ | ==== Expiry of the OTP ==== | ||
+ | * The current expiry time for an OTP is two minutes. | ||
+ | * This can be adjusted by editing **/ | ||
+ | * Look for this line and adjust acordingly. | ||
+ | <code php> | ||
+ | protected $valid_minutes = 2; //The time that an OTP will be valid (in minutes) | ||
+ | </ | ||
+ | * For the verification through the Email link we expire the OTP after** $valid_minutes times two**. (4minutes) | ||
+ | |||
+ | ==== Disconnecting Temp Connection ==== | ||
+ | * The URL link in the email will cause a redirect to a special CoovaChilli URL that will log the user out (http:// | ||
+ | * For this to happen the user should be connected to the Captive Portal so that this URL can log them out. | ||
+ | |||
+ | <code php> | ||
+ | if($otp == $q_r-> | ||
+ | $success = true; | ||
+ | $this-> | ||
+ | $this-> | ||
+ | $user_id = $q_r-> | ||
+ | $q_pu = $this-> | ||
+ | if($q_pu){ | ||
+ | $this-> | ||
+ | $this-> | ||
+ | } | ||
+ | $this-> | ||
+ | return $this-> | ||
+ | |||
+ | }else{ | ||
+ | |||
+ | </ | ||
+ | <WRAP center round important 100%> | ||
+ | We are still looking for a similar way to disconnect users on a Mikrotik based Hotspot. | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||