You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2018. It is now read-only.
@@ -112,19 +112,19 @@ Authentication against an OAuth provider is a multi-step process, but I have tri
112
112
113
113
First you will need to define the authorization route. This is the route that your "Login" button will point to, and this route redirects the user to the provider's domain to authorize your app. After authorization, the provider will redirect the user back to your second route, which handles the rest of the authentication process.
114
114
115
-
To authorize the user, simply return the `OAuth::authorize()` method directly from the route.
115
+
To authorize the user, simply return the `SocialAuth::authorize()` method directly from the route.
116
116
117
117
```php
118
118
Route::get('facebook/authorize', function() {
119
-
return OAuth::authorize('facebook');
119
+
return SocialAuth::authorize('facebook');
120
120
});
121
121
```
122
122
123
123
### Authenticating within your app
124
124
125
125
Next you need to define a route for authenticating against your app with the details returned by the provider.
126
126
127
-
For basic cases, you can simply call `OAuth::login()` with the provider name you are authenticating with. If the user
127
+
For basic cases, you can simply call `SocialAuth::login()` with the provider name you are authenticating with. If the user
128
128
rejected your application, this method will throw an `ApplicationRejectedException` which you can catch and handle
129
129
as necessary.
130
130
@@ -140,7 +140,7 @@ use SocialNorm\Exceptions\InvalidAuthorizationCodeException;
140
140
141
141
Route::get('facebook/login', function() {
142
142
try {
143
-
OAuth::login('facebook');
143
+
SocialAuth::login('facebook');
144
144
} catch (ApplicationRejectedException $e) {
145
145
// User rejected application
146
146
} catch (InvalidAuthorizationCodeException $e) {
@@ -167,7 +167,7 @@ object that contains basic information from the OAuth provider, including:
@@ -197,10 +197,10 @@ But, each provider offers its own sets of additional data. If you need to access
197
197
198
198
> Note: By increasing the scope you will be asking the user to grant access to additional information. They will be informed of the scopes you're requesting. If you ask for too much unnecessary data, they may refuse. So exercise restraint when requesting additional scopes.
199
199
200
-
2. Now where you do your `OAuth::login`, store the to your `$user` object by accessing the `$details->raw()['KEY']` data:
200
+
2. Now where you do your `SocialAuth::login`, store the to your `$user` object by accessing the `$details->raw()['KEY']` data:
0 commit comments