Skip to content

Commit

Permalink
Adjust HWIOAuthBundle recipe for version 2.x (#1597)
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd committed Feb 24, 2024
1 parent e0baded commit 71b233d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hwi/oauth-bundle/2.0/config/packages/hwi_oauth.yaml
@@ -0,0 +1,8 @@
hwi_oauth:
# https://github.com/hwi/HWIOAuthBundle/blob/master/docs/2-configuring_resource_owners.md
resource_owners:
facebook:
type: facebook
client_id: '%env(FB_ID)%'
client_secret: '%env(FB_SECRET)%'
scope: "email public_profile"
11 changes: 11 additions & 0 deletions hwi/oauth-bundle/2.0/config/routes/hwi_oauth_routing.yaml
@@ -0,0 +1,11 @@
hwi_oauth_redirect:
resource: "@HWIOAuthBundle/Resources/config/routing/redirect.php"
prefix: /connect

hwi_oauth_connect:
resource: "@HWIOAuthBundle/Resources/config/routing/connect.php"
prefix: /connect

hwi_oauth_login:
resource: "@HWIOAuthBundle/Resources/config/routing/login.php"
prefix: /login
12 changes: 12 additions & 0 deletions hwi/oauth-bundle/2.0/manifest.json
@@ -0,0 +1,12 @@
{
"bundles": {
"HWI\\Bundle\\OAuthBundle\\HWIOAuthBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
},
"env": {
"FB_ID": "",
"FB_SECRET": ""
}
}
15 changes: 15 additions & 0 deletions hwi/oauth-bundle/2.0/post-install.txt
@@ -0,0 +1,15 @@
* <fg=blue>Configure</> your application:
1. Add firewall by adding <comment>- main:
anonymous: true
oauth:
resource_owners:
my_github: "/login/check-github"
login_path: /login
use_forward: false
failure_path: /login

oauth_user_provider:
service: hwi_oauth.user.provider
</> in your security firewalls section.

* <fg=blue>Read</> the documentation at <comment>https://github.com/hwi/HWIOAuthBundle/blob/master/docs/3-configuring_the_security_layer.md</>

0 comments on commit 71b233d

Please sign in to comment.