Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Commit

Permalink
Merge pull request #4 from Cloudoki/feature/login-redirect-url
Browse files Browse the repository at this point in the history
Added a config parameter `redirect_url`.
  • Loading branch information
koenbetsens authored Mar 20, 2017
2 parents 6fa06a6 + 3ba7376 commit 8419a87
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/Cloudoki/OaStack/Controllers/OaStackViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ public function changepassword ($token)

return view('oastack::oauth2.reset', ['error'=> $reset->message]);

if (config('oastack.redirect_url'))

return redirect()->away(config('oastack.redirect_url'));

return redirect()->route('login');
}

Expand Down
12 changes: 9 additions & 3 deletions src/Cloudoki/OaStack/Views/oauth2/subscribed.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@
@else

<p>{{ trans('oastack::oauth2.user.subscribed.info', ['account'=> $name]) }}</p>

<a class="btn btn-default" href='{{ Config::get ('app.url') }}'>{{ trans('oastack::oauth2.user.subscribed.proceed') }}</a>


@if ( empty ( Config::get ('oastack.redirect_url' ) ) )

<a class="btn btn-default" href='{{ Config::get ('oastack.redirect_url') }}'>{{ trans('oastack::oauth2.user.subscribed.proceed') }}</a>

@else

<a class="btn btn-default" href='{{ Config::get ('app.url') }}'>{{ trans('oastack::oauth2.user.subscribed.proceed') }}</a>

@endif

</div>
Expand Down
6 changes: 5 additions & 1 deletion src/config/oastack.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@

'invite_url' => 'http://localhost/oauth2/invitation',
'reset_url' => 'http://localhost/oauth2/reset',
'privacy_url' => 'http://en.wikipedia.org/wiki/Privacy_policy'
'privacy_url' => 'http://en.wikipedia.org/wiki/Privacy_policy',
/*
* The URL to which users should be redirected after resetting their password
*/
'redirect_url' => ''
);

0 comments on commit 8419a87

Please sign in to comment.