cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1010
Views
0
Helpful
7
Replies

Web application authentication with PHP

deuce.sapp
Level 1
Level 1

Hi community! I’m trying to add Duo Authentication to my PHP web app. I have “tried” to follow the documentation for the SDK under PHP, but none of the example/demo files work for me.

Is there any sample code out there that anyone has used that you could recommend? I’m not trying to do anything fancy, just present the authentication screen, and capture a session variable that says you authenticated.

Thanks in advance.

7 Replies 7

Egert143
Level 1
Level 1

Hello, Looking for similar info. Did you get it to work?

Duo, not DUO.

Egert143
Level 1
Level 1

Hello

When i copy the example folder to my test xampp server and run index.php i get error that ‘/vendor/autoload.php’ in not found, and there is no such file in this example.

Egert

I believe that gets added by composer? Did you run composer to get the demo requirements? I’m sorry to say I am not a PHP person…

Duo, not DUO.

Egert143
Level 1
Level 1

Php scripts dont need compiling or similar, just php server and they should work.

True, that’s just how we made the Duo PHP example app work with our chosen web framework.

The example application provided demonstrates how to use the Duo client from an already-existing web application that already has authentication capabilities. It does not represent an entire authentication module that can simply be dropped in place.

I hope that information helps.

Duo, not DUO.

So far i havent managed to get this sample code to work unfortunately. Perhaps someone has more basic example, where main auth is hard coded into pre filled variables, and example code does mfa with it?

Quick Links