Category : oauth-2.0

I am working in two apps: accounts.domain.com (Laravel app) and dash.domain.com (Not laravel, but php). I want dash users to login through accounts to use the app, so I figured I could use OAuth to achieve this. I installed Laravel Passport and everything worked fine when getting an authorization code: $query = http_build_query([ ‘client_id’ => ..

Read more

I am trying to create a new contact using Xero oAuth 2.0 and getting this error: [401] Client error: `PUT https://api.xero.com/api.xro/2.0/Contacts?summarizeErrors=true` resulted in a `401 Unauthorized` response: I have got my scopes as: ‘scopes’ => [ ‘openid’, ’email’, ‘profile’, ‘offline_access’, ‘accounting.settings’, ‘accounting.contacts’, ‘accounting.reports.read’, ], I am able to connect to get the message The App ..

Read more

I’m using Laravel Passport 5.7. I want to use own model to authenticate user. When I change custom User into mine Tenancy it always says ‘unarhorized’. auth.php ‘guards’ => [ … ‘api’ => [ ‘driver’ => ‘passport’, ‘provider’ => ‘tenants’, ], … ], ‘providers’ => [ ‘users’ => [ ‘driver’ => ‘eloquent’, ‘model’ => AppUser::class, ..

Read more

So… I have a front-end application, which sends requests to an API, that I’m writing in laravel. This is the over-simplified laravel way, to create access tokens $user = Auth::user(); $token = $user->createToken(‘authToken’)->accessToken; But when creating this token, I want to somehow store user’s IP to the same DB record, that laravel will store the ..

Read more

So… I have a front-end application, which sends requests to an API, that I’m writing in laravel. This is the over-simplified laravel way, to create access tokens $user = Auth::user(); $token = $user->createToken(‘authToken’)->accessToken; But when creating this token, I want to somehow store user’s IP to the same DB record, that laravel will store the ..

Read more

I am working on a Laravel site and I have been the LoginController. Although I obtain the auth_token at login – it doesn’t allow me to call the user method – it claims the user is "unauthetnicated" https://laravel.com/docs/7.x/passport https://laravel.com/docs/5.8/api-authentication I followed some documentation claiming that its unauthenticated because I need to group commands in the ..

Read more

I am trying to apply multiple authentication to laravel using passport authentication passport. But its showing every time for admin authentication. I tried many times, but not able to authentication. Please help. This is my admin class class Admin extends Authenticatable { use Notifiable, HasApiTokens; protected $guard = ‘admin’; /** * The attributes that are ..

Read more

I’m here to ask about the oauth / token using the curl. In the previous case I used the valet laravel. Here’s an example from my valet host. http://project.pro But for some reason I did not return to using valet and use laravel in general, namely php artisan serve. http://127.0.0.1:8000 Previously my oauth / token ..

Read more

I am new to laravel and angular. I m using Laravel Framework 7.10.2 and Angular CLI: 8.3.26 I configured laravel passport according to documentation. Now when user logged in my api sends access token to my angular app.like this(copied from developer console) token:”eyJ0eXAiOixxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxx” this is my laravel login method. class UserController extends Controller { public ..

Read more

I learn oath2 in laravel 6 with passport and I want to add to my testing passport app several external apps. First I installed phpbb and found this https://area51.phpbb.com/docs/dev/3.2.x/extensions/tutorial_authentication.html tutorial. But I stuck on first steps, as I read : An authentication provider that comes with phpBB requires a minimum of two files: a class ..

Read more