I can not find Security Provider Enforcer

Nope…

After refreshing that circle, I got this problem…so…

ok @Miwa, try closing the page and reopening the page.

Err wait, before doing that, is this a SPA page?

I did it…but remains same…um…

yes, this is a SPA page.

@Miwa are you trying to use the Security Provider Enforcer on the main SPA page or a content SPA page?

I am trying to do this on a content page.

Ok that makes sense now @Miwa. Security Provider Enforcer does not work on SPA content pages. See Secure SPA Sites for more information and tips and tricks about how to utilize separate public and secure SPA main pages.

Note: You can utilize more than one SPA and link the main pages together just like you would like together regular pages. For example:

Public SPA
-link to Secure SPA page

1 Like

Thanks @scott, now I can see what’s your point!

I read through the link and try to make separate SPA pages then!

1 Like

I have checked this out, on a new page it did not see the security provider option

I added an App ID and changed the App root from Body to Page and the security provider option appeared.
I could then freely change from App Root is Page or Body without losing the option
If i am correct I conclude this may be a bug but the workaround is easy, just temporarily change the app Root

1 Like

I had the same issue and thought maybe it was removed, so I made another plan to make my own conditional statement. When I saved and closed the file, and then reopened the file a week later, I saw the enforcer option was available again. Lol. I have just left it, as my semi solution works for the silly little thing I was doing.

Actually, I separated SPA as @scott mentioned.

However, when I access the restrict page, it doesn’t transit to signin page.
So restrict page doesn’t work…

44

49

12

Please tell me how to solve this problem!

Thanks,

Can you give a link to a restricted page so I can view what is happening/ check code?

@Hyperbytes

https://bestinx.me/voting/vote/sethbrogan

this is a restricted page.

Thanks,

Where are you placing the restrictions, nothing in sethbrogan.php to show any restrict?

sethbrogan.php is a SPA content page.

I did restrict setting on page.php.

After setting, the content of sethbrogan.php doesn’t appear, which is good.
But it doesn’t jump to singin.php…this is current problem.

Still trying to get my head around exactly what the issue is.

Nothing wrong with page.php, if you call it directly (https://bestinx.me/page.php) the security provider works correctly and you are redirected to the signin page.

I guess the issue is your routing, not the security providers

sethbrogaqn seems to be a content page of page.php so the security enforce works correctly on page.php consequently the sethbrogan link can only be seen by a user with the correct credentials i.e. logged in as the page is protected.

Are you trying force a security redirect if someone tries to bypass the security on page.php and run https://bestinx.me/voting/vote/sethbrogan directly?

My pages are as follows(I write only pages which matter this problem).

index.php(1st SPA main page and not restricted)
-signin.php (/signin) (1st SPA content page)
-voting_list.php(/voting/list) (1st SPA content page)

page.php(2nd SPA main page and restricted)
-sethbrogan.php (/voting/vote/sethbrogan) (2nd SPA content page)

I want to redirect, those who visit /voting/vote/sethbrogan by clicking the button on /voting/list, to /singin .

To answer this question, might be yes. Is this possible?

My understanding is the security enforcer can only be added to the parent page so it can’t be used to protect the SPA content page which is effectively protecting the link within it to the content pages.

If someone manually types in the SAP route to bypass this then as it points to a invalid browser page (i.e. only has content but lacks headers etc) it can’t be accessed directly without a 404 error being generated.

Not really sure how you could get around this, if at all. It may be you have to accept the 404 error page in the event of someone effectively trying to hack your content.

I personally am not an SPA expert, there are others here far more knowledgeable about them

1 Like

oh I see…I misunderstood it…

But my question is clear now, thank you so much for leading me to the solution!!

P.S. Love the site, great menu, may have to steal that one day!

1 Like