You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
I have a major situation and I am stuck for a week or so with this.
So, this boilerplate works very well with multiple upgrades/updates from me for some components/server side and I have the next situation:
I want to implement (right now with no success) different auth methods using dingo and JWT, but each method to have it's prefix in url.
Short Description:
I have an app in production with this boilerplate and is protected for admins with the User model/table. I want to add a table called Clients and I want a login valid from my Ionic app. They should not have the possibility to login in Admin section, that'w why I need different urls and because i want a better routes management.
Right now every request with token runs on the next URL:
Created a clone after this file: config/api.php => config/clientapi.php and updated everything so the api should connect to what needs the most
I think my problem is here, or something like that:
app/Providers/RouteServiceProvider
use Illuminate\Routing\Router;
use Dingo\Api\Routing\Router as ApiRouter;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
public function map(Router $router, ApiRouter $apiRouter)
{
$apiRouter->version($this->version, function ($apiRouter) use ($router) {
$apiRouter->group(['namespace' => $this->namespace], function ($api) use ($router) {
$router->group(['namespace' => $this->namespace], function ($router) use ($api) {
require app_path('Http/routes.php');
});
});
});
$apiRouter->version('v2', function ($apiRouter) use ($router) {
$apiRouter->group(['prefix' => 'clientapi', 'namespace' => $this->namespace], function ($api) use ($router) {
$router->group(['prefix' => 'clientapi', 'namespace' => $this->namespace], function ($router) use ($api) {
require app_path('Http/routes-client.php');
});
});
});
}
example of auth routes which sould be replicated for lcient
Hi,
I have a major situation and I am stuck for a week or so with this.
So, this boilerplate works very well with multiple upgrades/updates from me for some components/server side and I have the next situation:
I want to implement (right now with no success) different auth methods using dingo and JWT, but each method to have it's prefix in url.
Short Description:
I have an app in production with this boilerplate and is protected for admins with the User model/table. I want to add a table called Clients and I want a login valid from my Ionic app. They should not have the possibility to login in Admin section, that'w why I need different urls and because i want a better routes management.
Right now every request with token runs on the next URL:
https://domain/api/* => it's very ok this
For clients I want the next prefix to work:
https://domain/client/*
What I've done till now, but I struggle with DINGO API implementation:
config/auth.php
Created a clone after this file: config/api.php => config/clientapi.php and updated everything so the api should connect to what needs the most
I think my problem is here, or something like that:
example of auth routes which sould be replicated for lcient
Whatever I am trying to do or trying to adjust, seems to get me nowhere.
Every time I am trying to change $api in $cetateanapi request responds with 404 not found or errors like object not found.
I do not want only a guard method active inside controllers, I need to separate stuff from users(admins) and citizens.
Searched all over stackoverflow and laracasts forum but no luck.
I can't save the information on the same table because it is possible for an user to have a citizen account.
Thank you, Johnny
The text was updated successfully, but these errors were encountered: