Coder Social home page Coder Social logo

Comments (5)

stloyd avatar stloyd commented on August 16, 2024

This is not a bug IMO. There is a clear note in the docs you pointed:

Remember that you can (and you should) also overwrite templates provided by this bundle

Thus you should adjust the base templates from the bundle to your needs, we cannot ensure that the end user sets all things.

from hwioauthbundle.

sovetski avatar sovetski commented on August 16, 2024

@stloyd and what about

Also in src\Resources\config\routing\connect.php the registration route is hardcoded, we should be able to customize it.
In my case I am using Symfony's default Security solution to handle my users, and I already have a route named register, I don't want to get double route with registration, and If I am not wrong, with the current version it is not possible

from hwioauthbundle.

stloyd avatar stloyd commented on August 16, 2024

You can add your route, what is important is just the name and parameters in the route, we don't care about what path the route has.

from hwioauthbundle.

sovetski avatar sovetski commented on August 16, 2024

@stloyd I don't see anywhere on the documentation which says how to customize the route after user tries to login with a not existing account. It redirects automatically to the route /connect/registration which is hardcoded in src\Resources\config\routing\connect.php.

from hwioauthbundle.

stloyd avatar stloyd commented on August 16, 2024

You don't see this cause setting routes are basics of usage of Symfony.

As said you're not forced to use that routing, you can create a new routing file like this:

use HWI\Bundle\OAuthBundle\Controller\Connect\ConnectController;
use HWI\Bundle\OAuthBundle\Controller\Connect\RegisterController;
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

return static function (RoutingConfigurator $routes) {
    $routes->add('hwi_oauth_connect_service', '/service/{service}')
        ->controller([ConnectController::class, 'connectServiceAction'])
        ->methods(['GET', 'POST']);

    $routes->add('hwi_oauth_connect_registration', '/my-own-registration/{key}')
        ->controller([RegisterController::class, 'registrationAction'])
        ->methods(['GET', 'POST']);
};

from hwioauthbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.