Category : oauth

I’m planning on building a small platform like Salonized. Frontend in Nuxt.js, and a separated multi-tenant backend in Laravel for the API’s. I’m not sure what to use to authenticate the users and API calls (Passport/Oauth2, Sanctum?), because of the following: The application will hold salon appointments, and I want to offer the option to ..

Read more

I want to return the scopes base on user role when nuxt auth requesting token in default localhost:3000/_auth/laravelPassport/token. here’s the nuxt.config.js auth strategy setup strategies: { laravelPassportPasswordGrant: { name: ‘laravelPassport’, provider: ‘laravel/passport’, url: process.env.API_URL, endpoints: { logout: ‘/api/auth/logout’, user: { url: ‘/api/auth/user’, }, }, clientId: process.env.PASSPORT_CLIENT_ID, clientSecret: process.env.PASSPORT_CLIENT_SECRET, grantType: ‘password’, }, }, My Laravel boot ..

Read more

I’m building an application that uses Discord for Authentication. I’m using the Laravel Socialite Package with Martin Beans Discord Authentication plugin. I’m getting the following error: GuzzleHttpExceptionClientException Client error: `POST https://discord.com/api/oauth2/token` resulted in a `400 Bad Request` response: {"error": "invalid_request", "error_description": "Missing "code_verifier""} This is the code i am using Route::get(‘auth/redirect’,function() { return Socialite::with(‘discord’)->scopes([‘guilds.join’])->redirect(); }); ..

Read more

I am troubled to make a POST request in oauth1.0 using PHP. It’s working perfectly GET request. Can you please help me where am I doing a mistake? The Below code shows the method that I am used to call API. <?php namespace AppHelpers; use AppModelsZoeyAccount; use IlluminateSupportFacadesCrypt; class ZoeyAPI { private $consumerKey; private $consumerSecret; ..

Read more

I am using Laravel 8 and after generating token I got "message": "Unauthenticated.". Accept is application/json Authorization is Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI4IiwianRpIjoiNWEwZTMxMjU3YmU4OWM1YWQyMjcxZDZiMjBmNGRmZWEzMDk2ZTU2YWUyNmMxNjljZDQ5NmNhZjVhNjdlNmQ2OTFiMTAzMTdmYTAzNmJjOGYiLCJpYXQiOjE2MjQ4MDkwMTIsIm5iZiI6MTYyNDgwOTAxMiwiZXhwIjoxNjI3NDA2NDU3LCJzdWIiOiIiLCJzY29wZXMiOltdfQ.X5IQ3sb2TSYdzp9oEyn-CODL79DDE9ezUsv5jCDNsJSeJsbe3gTuzEeJ6ENIc8ZDGwOZ0-JCqIZuTOK39i7IYZ2Q4S4ctO0vp6DEw7HaDVa0bWpFO7bVC9d05rbBsZpzmidMixerwOgT1GAILBVTI_qKQyjdaKHV1m9qihU5AMQ2XCceq0m9RL24T2Pg4NV8xsOxkv3pl4TDCBfZ8MwdKBZ5Z0WTJAh6YFrKGSLhZOA0u9aSl6iuaJGAR_LblTdugjsmwkfijMzRR4wucaa67wbL6HF0eUpvPQ0rdoc1VgR4D_Y8nWfLfCOi1PNsitnc8-Qbr7t8ijLnKe0tDmJVvNxq49TNKnFv_y-EcumIOW1pzzQKvX1zWMS2yrsqlbhftN5dJWGbwA01qZpjJITyGW1C-VOEVG_Wpcjxlk7rd4vIghq4IiTzlUu3Mz4s7aLAtdyaNT0Mkv1aurG4L0hOmvrZkJaiiNtrGNcWBkU9yc9ISFUaFagszOnDo52YPnzu7CCDNk0ekUIWQwsJlA7Tcbib69JuL_XpD9fMcz0QD1BhHkCEdPna7rhtcT-xOto0QOL5YluHW7svwcSuYc5JcoLXwdLLFNlkyxFcbYIYjyOjc8ytMvYYZsar36waLL7boOiu5DyvjHDqnStBvJIHXAWSs-Y6DfGAVvTxOoqwEa0 In the form-data, I have grant_type is client_credentials client_id is 8 client_secret is mOu1oBuLHyExwTnRY9Noq9MvQdnbHkNKmPkdVyrz Sourc..

Read more

I have checked the code many times the code seems fine and I’m unable to understand why I’m redirected to http://127.0.0.1:8000/oauth/authorize? and not to http://127.0.0.1:8000/login. Route::get("/login", function(Request $request) { $request->session()->put("state", $state = Str::random(40)); $query = http_build_query([ "client_id" => "93c3d849-44fb-409f-a72b-872d58f91490", "redirect_uri" => "http://127.0.0.1:8080/callback", "response_type" => "code", "scope" => "view-user", "state" => $state ]); return redirect("http://127.0.0.1:8000/oauth/authorize?" . ..

Read more

I’m trying to communicate with Spotify using web API. So here’s the case. In order to retrieve any information from Spotify, first I need to be authorized by Spotify. To do so, I need to send a post request to https://accounts.spotify.com/api/token containing authorization credentials(containing client_id and client_secret), and then in response, I should receive an ..

Read more

It is strange, but in a scrutinizer deployment process there is an error: "Your github oauth token for github.com contains invalid characters" See on scrutinizer: https://scrutinizer-ci.com/g/itstructure/laravel-rbac/inspections/62506d6a-a17c-47ae-8551-6817b6d93310 My package: https://github.com/itstructure/laravel-rbac Please Help! Sourc..

Read more

Hi im gettin this error by making the http request on /oauth/authorize?$query {"error":"unsupported_grant_type","error_description":"The authorization grant type is not supported by the authorization server.","hint":"Check that all required parameters have been provided","message":"The authorization grant type is not supported by the authorization server."} Request: Route::get(‘/login’, function(Request $request) { $request->session()->put(‘state’, $state = Str::random(40)); $query = http_build_query([ ‘id’ => ‘9324f642-bd8a-4923-b2ad-a5b0d559424c’, ..

Read more

I am trying to figure it out what is the best solution for Laravel (or compatible with it) that provides an unified interface for autoposting (and scheduling) on several social networks like (for example): Facebook, Instagram, Twitter, Pinterest, Tumblr, Reddit … Based on my research I think that Laravel Socialite wasn’t meant for this purpose ..

Read more

I am facing an issue on Laravel passport issuing an access token from sever side. so whenever I fire oauth/redirect this route it’s given me code but I didn’t get token in oauth/redirect route here are my redirect and callback methods /** * @return IlluminateContractsFoundationApplication|IlluminateHttpJsonResponse|IlluminateHttpRedirectResponse|IlluminateRoutingRedirector|void */ public function redirect(Request $request) { try { $request->session()->put(‘state’, $state ..

Read more

With email it generates successfully AccessToken but not with phone number please help me .. I am using OAuth authentication. here are some details.. 401 Unauthorized http://phplaravel-528344-1682591.cloudwaysapps.com/api/user/oauth/token (769ms) {error The user credentials were incorrect error description The user credentials were incorrect message The user credentials were incorrect} $tokenRequest = $request->create(‘/oauth/token’, ‘POST’, $request->all()); $request->request->add([ "client_id" => ..

Read more

i am developing a mobile app which loggin in using email but now With email it generates successfully AccessToken but not with phone number please help me .. I am using OAuth authentication. here are some details.. 401 Unauthorized http://phplaravel-528344-1682591.cloudwaysapps.com/api/user/oauth/token (769ms) {error The user credentials were incorrect error description The user credentials were incorrect message ..

Read more