OPNsense Forum

English Forums => General Discussion => Topic started by: olest on June 22, 2021, 11:26:19 am

Title: Captive Portal reload or redirect after sign in
Post by: olest on June 22, 2021, 11:26:19 am
When I use Captive Portal and hit "sign in" the page does not reload at Android.
At Ipad I get blank page with the text Success instead of a page with "logout"
Can this be fixed?

How do I define redirurl from the GUI (like Pfsense have)

From default template:
Code: [Select]

                       // redirect on successful login
                        if (data['clientState'] == 'AUTHORIZED') {
                            if (getURLparams()['redirurl'] != undefined) {
                                window.location = 'http://'+getURLparams()['redirurl']+'?refresh';
                            } else {
                                window.location.reload();
Title: Re: Captive Portal reload or redirect after sign in
Post by: wuping on April 14, 2022, 02:01:05 pm
// redirect on successful login
                        if (data['clientState'] == 'AUTHORIZED') {
                            window.open("http://www.google.com");
                            if (getURLparams()['redirurl'] != undefined) {
                                window.location = 'http://'+getURLparams()['redirurl']+'?refresh';
                            } else {
                                window.location.reload();