Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomayobre committed Aug 2, 2021
0 parents commit 94d9440
Show file tree
Hide file tree
Showing 43 changed files with 34,304 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": [ "plugin:@wordpress/eslint-plugin/recommended" ],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
}
}
143 changes: 143 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/
vendor/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test
.env.production

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Webpack build
build/

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# ignore everything in the root except the "wp-content" directory.
!wp-content/

# ignore everything in the "wp-content" directory, except:
# "mu-plugins", "plugins", "themes" directory
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/

# ignore these plugins
wp-content/plugins/hello.php

# ignore specific themes
wp-content/themes/twenty*/

# ignore log files and databases
*.log
*.sql
*.sqlite
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@wordpress/prettier-config"
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"bmewburn.vscode-intelephense-client",
"jpagano.wordpress-vscode-extensionpack"
]
}
84 changes: 84 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"intelephense.stubs": [
"apache",
"bcmath",
"bz2",
"calendar",
"com_dotnet",
"Core",
"ctype",
"curl",
"date",
"dba",
"dom",
"enchant",
"exif",
"FFI",
"fileinfo",
"filter",
"fpm",
"ftp",
"gd",
"gettext",
"gmp",
"hash",
"iconv",
"imap",
"intl",
"json",
"ldap",
"libxml",
"mbstring",
"meta",
"mysqli",
"oci8",
"odbc",
"openssl",
"pcntl",
"pcre",
"PDO",
"pdo_ibm",
"pdo_mysql",
"pdo_pgsql",
"pdo_sqlite",
"pgsql",
"Phar",
"posix",
"pspell",
"readline",
"Reflection",
"session",
"shmop",
"SimpleXML",
"snmp",
"soap",
"sockets",
"sodium",
"SPL",
"sqlite3",
"standard",
"superglobals",
"sysvmsg",
"sysvsem",
"sysvshm",
"tidy",
"tokenizer",
"xml",
"xmlreader",
"xmlrpc",
"xmlwriter",
"xsl",
"Zend OPcache",
"zip",
"zlib",
"wordpress"
],
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"editor.tabSize": 2,
"phpcs.enable": false,
"files.eol": "\n",
"files.insertFinalNewline": true,
"editor.formatOnSave": true,
"maven.view": "flat"
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 The Mars Society Argentina

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Phobos Auth

This plugin adds social login options to Ultimate Member in the WordPress site of The Mars Society Argentina.

## Description

This plugin is intended to add Single Sign On options to Ultimate Member without using the paid Add-On.

Currently it only supports Discord but more OAuth2 providers can be added.

This plugin uses [The PHP League OAuth2 Client library](https://oauth2-client.thephpleague.com/) internally so all of the [official providers](https://oauth2-client.thephpleague.com/providers/league/) and [third-party providers](https://oauth2-client.thephpleague.com/providers/thirdparty/) can potentially be added to this plugin.

## Installation

Before you install this plugin you should install the following plugins:
* Ultimate Member
* Native PHP Sessions
* Phobos

Once you have installed and activated these plugins, follow the next steps:
1. Upload the `phobos-auth` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Start configuring your settings

## Connecting to Discord

In order to connect this plugin to Discod you need to perform the following steps:

1. Start by registering an Application in the [Discord Developer Portal](https://discord.com/developers/applications).
2. Head over to the OAuth2 tab, and grab your Client ID and Client Secret so that you can paste them in the Discord Settings of this plugin.
3. Grab the Redirects you can find in the Discord Settings of this plugin, and add them to the Redirects list of the OAuth2 tab on your Discord Application.

Enjoy!

## Frequently Asked Questions

### What OAuth2 providers are implemented?

Currently only Discord, more can be added in the future.

### How is this better than the SSO add-on to Ultimate Member?

It's probably not better, but it's free.

## License

MIT License - Copyright (c) 2021 [The Mars Society Argentina](https://tmsa.ar)

68 changes: 68 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
=== Phobos Auth ===
Contributors: The Mars Society Argentina
Donate link: https://tmsa.ar
Tags: social login, discord, ultimate member
Requires at least: 5.7.0
Tested up to: 5.8.0
Stable tag: 1.0.0
License: MIT
License URI: https://opensource.org/licenses/MIT

This plugin was made for The Mars Society Argentina. It adds social login options to Ultimate Member.

== Description ==

This plugin is intended to add Single Sign On options to Ultimate Member without using the paid Add-On.

Currently it only supports Discord but more OAuth2 providers can be added.

This plugin uses [The PHP League OAuth2 Client library](https://oauth2-client.thephpleague.com/) internally so all of the [official providers](https://oauth2-client.thephpleague.com/providers/league/) and [third-party providers](https://oauth2-client.thephpleague.com/providers/thirdparty/) can potentially be added to this plugin.

== Installation ==

Before you install this plugin you should install the following plugins:
* Ultimate Member
* Native PHP Sessions
* Phobos

Once you have installed and activated these plugins, follow the next steps:
1. Upload the `phobos-auth` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Start configuring your settings

== Frequently Asked Questions ==

= What OAuth2 providers are implemented? =

Currently only Discord, more can be added in the future.

= How is this better than the SSO add-on to Ultimate Member? =

It's probably not better, but it's free.

== Screenshots ==

1. Settings for this plugin.
2. Connecting a Discord account.
3. User information for a connected account.
4. Login with Discord.

== Changelog ==

= 1.0.0 =
* First working release

== Upgrade Notice ==

= 1.0.0 =
No upgrade is needed

== Connecting to Discord ==

In order to connect this plugin to Discod you need to perform the following steps:

1. Start by registering an Application in the [Discord Developer Portal](https://discord.com/developers/applications).
2. Head over to the OAuth2 tab, and grab your Client ID and Client Secret so that you can paste them in the Discord Settings of this plugin.
3. Grab the Redirects you can find in the Discord Settings of this plugin, and add them to the Redirects list of the OAuth2 tab on your Discord Application.

Enjoy!
Loading

0 comments on commit 94d9440

Please sign in to comment.