Dymantic / laravel-instagram-feed

147 stars 51 forks source link

Added the possibility to ignore the default routes. #57

Closed christophheich closed 2 years ago

christophheich commented 2 years ago

This PR provides the ability to ignore the default route registered by the instagram service provider. This allows us to override the handleRedirect method in the AccessTokenController class.

Since the registersRoutes variable is static, we can simply disallow the Instagram service provider from binding its routes by using the following method before the instagram service provider is called, e. g. within the app service provider using "Instagram::ignoreRoutes()".

felix-exon commented 2 years ago

A little comment on why this is needed/useful: We are working with your package in a mutlti-tenancy-environment where every tenant has it's own subdomain. so customer1.example.com needs a different redirect_uri than customer2.example.com.

defining the routes ourselfes is mandator hence we need to disable the automatically generated routes by your package.

michaeljoyner commented 2 years ago

Hi @christophheich and @deibertf, thank you very much for your contribution. It is appreciated.