Comments (20)
I ran into the same problem.
To debug it I just comment out the code that was causing issue. To try to get to the root of the problem.
Then I found multiple bugs:
-
First is the models call
$this->authserver = new League\OAuth2\Server\Authorization( new League\OAuth2\Server\Storage\PDO\Client($db), new League\OAuth2\Server\Storage\PDO\Session($db), new League\OAuth2\Server\Storage\PDO\Scope($db) );
That's the solution... This is found in the __construct method.
-
The next bug is found on line 30.
$this->authserver->addGrantType(new League\OAuth2\Server\Grant\AuthCode($this->authserver));
I am not sure this is the solution... But it stop the error message for this.
- Now to debug the first problem.
Solutions:
'error' => $this->authserver->getExceptionType($e->getCode()),
Then you will incouter another error... Here is the solution:
header($this->authserver->getExceptionHttpHeaders($this->authserver->getExceptionType($e->getCode())));
I hope it helps.
By the way you will encounter another problem.
Non-library specific error.
I am trying to figure it out.
from oauth2-server.
The next problem I got as to do with the $server variable. That is for some reason undefined.
The the $server var is supposed to have this value: $this->authserver.
Now I am still incoutering some issues. I am not sure I understand them... But when I do I will add new information.
from oauth2-server.
Thanks fella for looking into it.
Does this mean that taking care of one issue raises another and you still have not been able to make it work from the wiki ?
I am not able to atleast :( ...
from oauth2-server.
The problem is that I am not sure how to test out the code to see if everything is ok.
from oauth2-server.
Why is not the creator to this package helping us out ? I am sure he is the best person to sort this through :(
from oauth2-server.
Busy... Who knows. But I am trying different things on my server. When I get it to work I will explain here how I did it.
from oauth2-server.
Okay, that would be great. Amazing no one has found this out before. It's the first tutorial in the wiki ...
from oauth2-server.
The wiki is sort of a "pseudocode", you need to set it up based on your Framework.
For example I'm modifying it to work with CodeIgniter, I still have some issues, but it seems to work.
from oauth2-server.
Help me out with Laravel then :( ... Anyone ?
from oauth2-server.
I am! Today I some things to do. But tonight I will be working on it. And when I am done I will give more details on how to setup this package with Laravel 4.
Right now I am trying out OAuth2-client so that I can test it out with OAuth2-server.
The problem is that this package is just a framework to help you create a OAuth2-server. It does not have all the views and other things. You have to coded yourself. The reason, I think, it was to make this package as framework agnostic as possible. But trust me when I am done I will put a link to my GitHub with all the details.
from oauth2-server.
Guys, sorry I haven't helped out much, I've just started a new job, am moving house and have no Internet connection yet. Please bear with me.
Emailing from my iPhone like a BOSS
On 3 Jun 2013, at 22:46, Jean-Nicolas Boulay [email protected] wrote:
I am! Today I some things to do. But tonight I will be working on it. And when I am done I will give more details on how to setup this package with Laravel 4.
Right now I am trying out OAuth2-client so that I can test it out with OAuth2-server.
The problem is that this package is just a framework to help you create a OAuth2-server. It does not have all the views and other things. You have to coded yourself. The reason, I think, it was to make this package as framework agnostic as possible. But trust me when I am done I will put a link to my GitHub with all the details.
—
Reply to this email directly or view it on GitHub.
from oauth2-server.
@alexbilbie should I continue figuring it out? Or will you post updates that will make what I do obsolete?
@developerNoman another thing. Your controller should extend: "BaseController".
from oauth2-server.
@developerNoman if you're using oauth2-client with Laravel 4, you will need to debug it to make it work. Here is how: thephpleague/oauth2-client#5
I will continue tomorrow...
from oauth2-server.
In the OAuth2-client Provider folder I added my own provider PHP script.
But every time I try to connect to my oauth-server I get an error.
So there seems to be a bug with the controller that I have created in the oauth-server side... Or there is something else bugging.
from oauth2-server.
It seems that there is another problem with the tutorial. Again I am not sure.
But in section "Create your first client" of the wiki it says to put data in "oauth_clients" db table.
I found that it did not work. So I did some digging and found that I had too add the client_id and redirect_uri to the "oauth_client_endpoints" db table.
It's weird because the way it is written in the wiki it seems it's just optional.
I am now getting this error: "The requested scope is invalid, unknown, or malformed. Check the "offline_access,email,read_stream" scope."
I will try to solve it tonight but no guarantees.
from oauth2-server.
Regarding the scope error you should delimite your scopes with a space not a comma unless you override it.
Emailing from my iPhone like a BOSS
On 6 Jun 2013, at 07:59, Jean-Nicolas Boulay [email protected] wrote:
It seems that there is another problem with the tutorial. Again I am not sure.
But in section "Create your first client" of the wiki it says to put data in "oauth_clients" db table.
I found that it did not work. So I did some digging and found that I had too add the client_id and redirect_uri to the "oauth_client_endpoints" db table.
It's weird because the way it is written in the wiki it seems it's just optional.
I am now getting this error: "The requested scope is invalid, unknown, or malformed. Check the "offline_access,email,read_stream" scope."
I will try to solve it tonight but no guarantees.
—
Reply to this email directly or view it on GitHub.
from oauth2-server.
It works.
from oauth2-server.
@esolitos can you be so kind and tell me how you got it to work with CodeIgniter ?
from oauth2-server.
Hi QuasiPerfect, right now I don't remember the steps, anyway you have to change a looooot of things.
Take the tutorial as a pseudo-code and think what he's doing. After that you should be able to rewrite the tutorial code as you need it, imho don't try to copy-paste: Start over, it's easier.
If you still have issues I'll give a look to my code.
from oauth2-server.
I'm closing this because there are going to be some updated docs in the wiki.
from oauth2-server.
Related Issues (20)
- Does anyone know if this library is vulnerable to this hack? HOT 1
- Support league/event v3 HOT 4
- League/Oauth2-Server Key Exposure In Exception Message HOT 2
- AccessTokenTrait::__toString gives different result each call HOT 1
- Wrong Type in DocBlock 3rd param `AbstractGrant::issueAccessToken` HOT 1
- AuthCodeGrant applies wrong validation rules on code_challenge HOT 4
- 2FA HOT 1
- Support for PHP 8.3 HOT 1
- Testing v9-rc1 on Laravel Passport HOT 13
- Authentication scheme should be matched case-insensitively HOT 1
- Oauth
- The `scope` parameter has been mistakenly required on device access token request HOT 2
- Compatibility on interfaces HOT 2
- Initial Configuration HOT 3
- client_credentials has empty sub, how to get user information? HOT 1
- Issue with redirect_uri in Authorization Code Grant HOT 6
- Autogenerated Emitter is not persisted
- AuthCodeGrant doesn't reply with invalid_grant on bad "code" request paramter, but with invalid_request HOT 5
- Not supporting [RFC 9068] Must add issuer claim to the access token JWT!
- v9 Typing breaks existing refresh tokens
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth2-server.