Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/craft-4' into craft-5
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	composer.json
  • Loading branch information
engram-design committed Apr 11, 2024
2 parents 3a4abc0 + 87f8207 commit 0ac76a6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# Changelog

## 2.0.0-beta.2 - 2024-04-11

### Added
- Add improved session-handling for authorization and callback methods, to improve failed sessions in some cases.

## 2.0.0-beta.1 - 2024-03-04

### Changed
- Now requires PHP `8.2.0+`.
- Now requires Craft `5.0.0-beta.1+`.

## 1.0.10 - 2024-04-05

### Added
- Add improved session-handling for authorization and callback methods, to improve failed sessions in some cases.

## 1.0.9 - 2024-02-08

### Added
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"craftcms/cms": "^5.0.0-beta.1",
"symfony/property-access": "^6.0 || ^7.0",
"symfony/serializer": "^6.0 || ^7.0",
"verbb/auth": "^2.0.0-beta.1",
"verbb/auth": "^2.0.0-beta.2",
"verbb/base": "^3.0.0-beta.1"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion docs/developers/client-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class MyOAuthClientProvider extends OAuthClient

This is the minimum amount of implementation required for a typical OAuth client provider.

Consume client providers are built around the [Auth](https://github.com/verbb/auth) which in turn in built around [league/oauth2-client](https://github.com/thephpleague/oauth2-client). You can see that the `getOAuthProviderClass()` must return a `League\OAuth2\Client\Provider\AbstractProvider` class.
Consume client providers are built around the [Auth](https://github.com/verbb/auth) which in turn is built around [league/oauth2-client](https://github.com/thephpleague/oauth2-client). You can see that the `getOAuthProviderClass()` must return a `League\OAuth2\Client\Provider\AbstractProvider` class.

## Credentials Example
A Credentials client is similar to an OAuth one, without the need to provide a `getOAuthProviderClass()` class.
Expand Down
3 changes: 3 additions & 0 deletions src/controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public function actionConnect(): ?Response

public function actionCallback(): ?Response
{
// Restore the session data that we saved before authorization redirection from the cache back to session
Session::restoreSession($this->request->getParam('state'));

// Get both the origin (failure) and redirect (success) URLs
$origin = Session::get('origin');
$redirect = Session::get('redirect');
Expand Down

0 comments on commit 0ac76a6

Please sign in to comment.