Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: text: "Could not find configuration: default / default" #42

Open
MaccerC opened this issue Sep 11, 2019 · 5 comments
Open

Error: text: "Could not find configuration: default / default" #42

MaccerC opened this issue Sep 11, 2019 · 5 comments

Comments

@MaccerC
Copy link

MaccerC commented Sep 11, 2019

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.

@mjza
Copy link

mjza commented Apr 6, 2020

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!

@mevdschee
Copy link
Owner

There is an example in the folder 'examples/clients/auth.php/', does that help?

@mjza
Copy link

mjza commented Apr 7, 2020

Not really. It has only an html file!
I have these questions:

  1. What should be the structure of the user table?
  2. Where to put auth.php file? Beside of the api.php?
  3. 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!

@mjza
Copy link

mjza commented Apr 7, 2020

@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!

@okobsamoht
Copy link

okobsamoht commented Feb 2, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants