This plugin is an OmniAuth login provider allowing Battle.net login to Discourse. This plugin utilizes omniauth-bnet.
Note: I do not know Ruby/RoR and this is my very first dabbling with such. Things have surely been done poorly and I apologize for that ahead of time.
- Allow users to signup/login to Discourse via their Battle.net Account
- Sets their username as their Battletag (# is replaced with _)
- Allows editing of imported info before account creation
- Customizable button text
- A working Discourse installation through Docker [reference]
- (optional) SSL
Install the plugin by editing your app.yml
file:
$ cd /var/discourse && sudo vim containers/app.yml
Add the following line to the hooks:
Note: spacing is no joke in YAML, be precise!
- git clone https://github.com/coryjreid/discourse-battlenet-auth.git
It should look like this:
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/coryjreid/discourse-battlenet-auth.git
Now run:
$ sudo ./launcher rebuild app
You need an application with Battle.net to allow authentication. If you don't have one yet you can easily register a new application at the Battle.net Developer Portal. I suggest doing this while Discourse rebuilds.
- Navigate to
Applications > Create A New Application
- Fill in the info as you see fit
- Add the following to REGISTER CALLBACK URL
https://YOUR.DISCOURSE.COM/auth/bnet/callback
Note: Use http or https depending on what your site supports - Check ISSUE A NEW GAME KEY FOR GAME APIS
- BASIC PLAN should be selected by default
- Agree to the Terms and click Register Application
- Copy down the Key and Secret as you will need them shortly.
Assuming your Discourse has finished rebuilding and is online, login and access
the admin control panel, navigate to Settings > Login
, and scroll down to find
your Battle.net settings (tip: filter using battlenet
in the search box).
- Check the box to enable login with Battle.net
- Copy and paste your Application Key into the appropriate field
- Copy and paste your Application Secret into the appropriate field
- Logout to see your plugin in action!
Simply rebuild your Discourse instance!
$ cd /var/discourse && sudo ./launcher rebuild app
- Create a Pull Request with a new translation
- Log Issues
- Submit Pull Requests to help resolve issues or add new features
MIT