Skip to content

Commit

Permalink
update readme and bump required steam version
Browse files Browse the repository at this point in the history
  • Loading branch information
scholtzm committed Oct 9, 2016
1 parent 05588bf commit f36841c
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 54 deletions.
24 changes: 24 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"env": {
"meteor": true
},
"globals": {
"Steam": false
},
"rules": {
"indent": [2, 2, {"SwitchCase": 1}],
"eqeqeq": 2,
"curly": 2,
"quotes": [2, "single"],
"no-unused-vars": 2,
"no-undef": 2,
"no-multi-spaces": 2,
"no-empty": 2,
"comma-dangle": [2, "never"],
"semi": [2, "always"],
"wrap-iife": [2, "inside"],
"linebreak-style": 2,
"comma-spacing": [2, {"before": false, "after": true}],
"no-spaced-func": 2
}
}
39 changes: 0 additions & 39 deletions .jshintrc

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Michael Scholtz <michael.scholtz@outlook.com>
Copyright (c) 2015+ Michael Scholtz <michael.scholtz@outlook.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# Steam OpenID integration for Meteor Accounts

Atmosphere is filled with over dozen Steam packages which provide this functionality, however most of these packages are either outdated or lack even the basic description, such as a README file.
This package provides seamless integration of Meteor accounts system with Steam's OpenID provider.

Tested with **Meteor 1.4.0.1** so far. The development of this package is not active because it just works.
Tested with **Meteor 1.4.1.2** so far.

Check out [meteor-accounts-steam-example](https://github.com/scholtz/meteor-accounts-steam-example) for a basic example.

## Installation

`meteor add scholtzm:accounts-steam`

## Usage

`Meteor.loginWithSteam(options, callback)`
`Meteor.loginWithSteam(options)`
* `options` - object containing options, see below (optional)
* `callback` - callback function (optional)
* `error` - `Meteor.Error` object if error occured; `null` otherwise

*Note:* `callback` will be only called if `loginStyle` is set to `popup`

#### Example

Expand All @@ -31,11 +29,8 @@ Template.myTemplateName.events({
These options override service configuration stored in the database.
* `loginStyle` - `redirect` or `popup`
* `redirectUrl` - where to redirect after successful login
*Note:* `redirectUrl` will be used only if `loginStyle` is set to `redirect`
The value below can be only set via Accounts UI dialog or by inserting the service configuration directly to database:
* `timeout` - timeout value (in milliseconds) for the OpenID handshake
Expand All @@ -46,6 +41,8 @@ This package integrates with `accounts-ui` and also provides configuration dialo
You can also skip the config dialog by running a short snippet in your `Meteor.startup` function, see below.
**NOTE:** Always choose redirect-based login flow. This package does not support logging in through popup.
## Manual configuration setup
You can manually configure this package by upserting the service configuration on startup. First, add the service configuration package:
Expand All @@ -61,8 +58,8 @@ if(Meteor.isServer) {
{ service: 'steam' },
{
$set: {
loginStyle: 'redirect',
timeout: 10000 // 10 seconds
loginStyle: 'redirect', // THIS MUST BE SET TO REDIRECT
timeout: 10000 // 10 seconds
}
}
);
Expand All @@ -82,6 +79,8 @@ Ideally, you should at least retrieve user's profile information when he logs in
If you wish to keep user's profile up-to-date, you can use [`Accounts.onLogin` (server-side)](http://docs.meteor.com/#/full/accounts_onlogin) or different approach.
There are plenty of other account hooks, check out [official Meteor docs](https://docs.meteor.com/).
## LICENSE
MIT. See `LICENSE`.
4 changes: 2 additions & 2 deletions package.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package.describe({
name: 'scholtzm:accounts-steam',
version: '1.1.1',
version: '1.2.0',
summary: 'Steam OpenID integration for Meteor Accounts',
git: 'https://github.com/scholtzm/meteor-accounts-steam',
documentation: 'README.md'
Expand All @@ -13,7 +13,7 @@ Package.onUse(function(api) {
api.imply('accounts-base', ['client', 'server']);

api.use('accounts-oauth', ['client', 'server']);
api.use('scholtzm:steam@1.1.0', ['client', 'server']);
api.use('scholtzm:steam@1.2.0', ['client', 'server']);

api.addFiles(['steam_login_button.css'], 'client');
api.addFiles('steam_common.js', ['client', 'server']);
Expand Down

0 comments on commit f36841c

Please sign in to comment.