php-api-auth
php-api-auth copied to clipboard
Error: text: "Could not find configuration: default / default"
Trying to get auth.php to work I get this error: text: "Could not find configuration: default / default"
This is the code I'm using: http.post('/auth.php', { username: username, password: password });
What am I doing wrong?
Furthermore: At the end of auth.php username and password are both returned as 'admin'. Do I have to change that or can I leave this empty? I don't get it, sorry.
I have the same problem. The php-api-xxx is a great serious libraries but the problem is it does not have a simple, straight forward How to use tutorial(s)!
I want to use auth beside of the api.php but I don't know how to combine them!
There is an example in the folder 'examples/clients/auth.php/', does that help?
Not really. It has only an html file! I have these questions:
- What should be the structure of the user table?
- Where to put
auth.phpfile? Beside of theapi.php? - How does the api.php know about the auth.php? I made the changes in the configuration as said in the readme file, but I see the above error!
@mevdschee OK. I have put the auth.php and login.php at the same folder of the examples/clients/auth.php/.
By calling the http://localhost:8080/examples/clients/auth.php/vanilla.html it will redirect to login.php and after a login it will return back!
Hello all! i found some little issues, whent fixed i got it worked for me.
1
replace this:
$audience = isset($_GET['audience']) ? $_GET['audience'] : 'default';
by:
$audience = isset($_GET['audience']) ? $_GET['audience'] : 'api.php';
so that configuration will be default / api.php (client_id / audience)
based on this:
main([ 'default' => [ 'api.php' => [.............................
2
in the config replace:
'redirects' => 'http://localhost/[folder]/vanilla.html',
by
'redirectUri' => 'http://localhost/[folder]/vanilla.html',
and that is it.
i hope it helps