Skip to content

Commit 2b25361

Browse files
Henry Chanhenrylamchan
Henry Chan
authored andcommitted
Update README
1 parent 705b5b1 commit 2b25361

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

README.md

+4-20
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Laravel SDK to conveniently access the [WorkOS API](https://workos.com).
44

5+
For more information on our API and WorkOS, check out our docs [here](https://docs.workos.com).
6+
57
## Installation
68

79
To install via composer, run the following:
@@ -19,7 +21,6 @@ For Laravel 5.0-5.4, add the WorkOS ServiceProvider in your `config/app.php`:
1921

2022
For Laravel 5.5 and up, 6.x and 7.x... you're all set!
2123

22-
2324
## Getting Started
2425

2526
Create a WorkOS configuration file by running the following:
@@ -30,23 +31,6 @@ php artisan vendor:publish --provider="WorkOS\Laravel\WorkOSServiceProvider"
3031
The package will need to be configured with your [api key](https://dashboard.workos.com/api-keys) and [project id](https://dashboard.workos.com/sso/configuration).
3132
By default, the package will look for a `WORKOS_API_KEY` and `WORKOS_PROJECT_ID` environment variable.
3233

33-
### SSO
34-
The package offers the following convenience functions to utilize WorkOS SSO.
35-
36-
First we'll want to generate an OAuth 2.0 Authorization URL to initiate the SSO workflow with:
34+
## Usage
3735

38-
```php
39-
$url = (new \WorkOS\SSO())->getAuthorizationUrl(
40-
'foo-corp.com',
41-
'http://my.cool.co/auth/callback',
42-
['things' => 'gonna get this back'],
43-
null // Pass along provider if we don't have a domain
44-
);
45-
```
46-
47-
After directing the user to the Authorization URL and successfully completing the SSO workflow, use
48-
the code passed back from WorkOS to grab the profile of the authenticated user to verify all is good:
49-
50-
```php
51-
$profile = (new \WorkOS\SSO())->getProfile($code);
52-
```
36+
Underneath it all, the Laravel SDK utilizes the WorkOS PHP SDK. For more information on usage, check out the docs [here](https://docs.workos.com/sdk/laravel) and the PHP SDK [here](https://github.com/workos-inc/workos-php).

0 commit comments

Comments
 (0)