I am new with OAuth but because it looks very interesting, I wanted to take a look at it. I have read and viewed some tutorials and I understand the basics. I downloaded this BitBucket provider: https://github.com/stevenmaguire/oauth2-bitbucket which uses this client: https://github.com/thephpleague/oauth2-client
The thing I don't understand is: how do I set the accessToken? When there is no ?code in the url it redirects and adds it to the url, then I get the accessToken and the refreshToken but how do I use that accessToken? I've tried some things, also $provider->setAccessToken() but that function doesn't exist.
Hope someone can help me. It's probably pretty easy but I don't see it.