Category : oauth-2.0

I am writing authorization using social networks (google). Spa app (front vue, backend symfony). On the backend there is a tricorder/oauth-bundle that writes out tokens, etc. didn’t find any examples of how to implement authorization for social network. Found only what you need to implement your grant type. https://github.com/trikoder/oauth2-bundle/blob/v3.x/docs/implementing-custom-grant-type.md Tell me, help, if anyone has ..

Read more

I use knpuniversity/oauth2-client-bundle and league/oauth2-google to connect users in my Symfony 4 web app using a “Sign in with Google” feature. I followed this tuto. I registered my app in Google. I set access_type: offline in the knpu.oauth2.client.google configuration (config/packages/knpu_oauth2_client.yaml file) I try to get the user refresh token in my GoogleAuthenticator::getUser(LeagueOAuth2ClientTokenAccessToken $credentials) method (which ..

Read more

I am using Gitlab authentication in my current symfony project. I am using following two packages. omines/oauth2-gitlab knpuniversity/oauth2-client-bundle Inside my security.yaml file security: # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers providers: app_user_provider: id: AppSecurityUserProvider firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: anonymous: true guard: authenticators: – AppSecurityGitlabAuthenticator access_control: – { path: ^/connect, roles: IS_AUTHENTICATED_ANONYMOUSLY } – { path: ^/, roles: ..

Read more