Skip to content

Commit

Permalink
Merge pull request #32 from thathoff/kirby-4
Browse files Browse the repository at this point in the history
Kirby 4 support
  • Loading branch information
thathoff authored Jan 10, 2024
2 parents 2475980 + 71f107b commit f628668
Show file tree
Hide file tree
Showing 10 changed files with 270 additions and 201 deletions.
Binary file added .github/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# Kirby OAuth 2 Plugin
# Kirby OAuth 2.0 Plugin

This plugin is an interface to use [OAuth 2.0](http://oauth.net/2/) providers for user authentication in [Kirby 3](https://getkirby.com). It uses the [PHP League’s OAuth 2 Client](https://oauth2-client.thephpleague.com/), so all [official](https://oauth2-client.thephpleague.com/providers/league/) and [third-party providers](https://oauth2-client.thephpleague.com/providers/thirdparty/) are supported. It’s even possible to [implement your own](https://oauth2-client.thephpleague.com/providers/implementing/).
![Screnshot of Kirby’s Login Screen with OAuth](/.github/screenshot.png?raw=true)

⚠️ For Kirby 3.5.0 support please use version 1 of this plugin. Version 2 only works with Kirby >= 3.6.0
This plugin is an plugin to provide [OAuth 2.0](http://oauth.net/2/) support for panel authentication in [Kirby](https://getkirby.com). It uses the [PHP League’s OAuth 2 Client](https://oauth2-client.thephpleague.com/), so all [official](https://oauth2-client.thephpleague.com/providers/league/) and [third-party providers](https://oauth2-client.thephpleague.com/providers/thirdparty/) are supported. It’s even possible to [implement your own](https://oauth2-client.thephpleague.com/providers/implementing/).

## Kirby Compatibility

- For **Kirby 4** use version 3.0.0 or higher
- For **Kirby 3.6 - 3.9** use version 2 or higher
- For **Kirby 3.0 - 3.6** use version 1 (not maintained anymore)

---

## Installation with Composer

Because of secondary dependencies for providers, installation via composer is the only currently supported method.
Because of secondary dependencies for providers, **installation via composer is the only currently supported method**.

### Install the Plugin
```
Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
"description": "Kirby OAuth 2 Plugin",
"type": "kirby-plugin",
"license": "MIT",
"version": "2.0.2",
"version": "3.0.0",
"authors": [
{
"name": "Markus Denhoff",
"email": "markus@denhoff.com"
},
{
"name": "reinorange GmbH",
"email": "info@reinorange.com",
"homepage": "https://reinorange.com"
}
],
"require": {
Expand Down
2 changes: 1 addition & 1 deletion index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
Kirby::plugin('thathoff/oauth', [
'routes' => include(__DIR__ . '/plugin/routes.php'),
'options' => include(__DIR__ . '/plugin/options.php'),
'api' => include(__DIR__ . '/plugin/api.php')
'api' => include(__DIR__ . '/plugin/api.php'),
'translations' => include(__DIR__ . '/plugin/translations.php'),
]);
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"devDependencies": {
"@vue/component-compiler-utils": "^3.2.0",
"parcel-bundler": "^1.12.4",
"vue-template-compiler": "^2.6.12"
"vue-template-compiler": "^2.6.12",
"vue": "^2.7.14",
"vue-hot-reload-api": "^2.3.4"
}
}
10 changes: 10 additions & 0 deletions plugin/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

return [
'de' => [
'thathoff.oauth.signInWith' => 'Anmelden mit…',
],
'en' => [
'thathoff.oauth.signInWith' => 'Sign in with…',
]
];
Loading

0 comments on commit f628668

Please sign in to comment.