Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Commit

Permalink
Remove the authentication part
Browse files Browse the repository at this point in the history
  • Loading branch information
llrs committed Feb 12, 2024
1 parent aa9127c commit e5676f1
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions vignettes/auth.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,8 @@ client <- rtweet_client(app = "my app")
```
Once you get your client you'll need to tell rtweet to use it (that's why we use `client_as()`).
But first you'll need to authorize it via `rtweet_oauth2()`:
It will ask your default browser to authorize the client.
You should have a Twitter session to authorize rtweet.
```{r rtweet_oauth2}
user_oauth2 <- rtweet_oauth2()
## Waiting for authentication in browser...
## Press Esc/Ctrl + C to abort
auth_as(user_oauth2)
auth_save(user_oauth2, "oauth2_authentication")
```
This authentication only last for 2 hours.
You'll be asked to renew the authorization if it is expired.
This authentication only last for 2 hours, you'll be asked to renew the authorization if it is expired.
### Apps
Expand Down Expand Up @@ -135,7 +123,7 @@ client_as(client)
## Saving and loading {#save}
`auth_as()` only lasts for a single session; if you close and re-open R, you'd need to repeat the whole process (generate the tokens and pass them to `rtweet_app()` or `rtweet_oauth2()`).
`auth_as()` only lasts for a single session; if you close and re-open R, you'd need to repeat the whole process (generate the tokens and pass them to `rtweet_app()`).
This would be annoying (!) so rtweet also provides a way to save and reload authentications across sessions:
```{r, eval = FALSE}
Expand Down

0 comments on commit e5676f1

Please sign in to comment.