> For the complete documentation index, see [llms.txt](https://devsb.gitbook.io/laranotes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devsb.gitbook.io/laranotes/tips/twitter-login-with-breeze-api.md).

# Twitter login with breeze api

### Create Twitter app

First, we need to create Twitter App and get an ID and Secret. So, let's follow bellow steps as well:

Go to Twitter Developer App to click here:

<https://developer.twitter.com/en/portal/dashboard>

<figure><img src="/files/Uaob8VkLghsxJmy4mYUY" alt=""><figcaption><p>Developer dashboard</p></figcaption></figure>

### Generate token from App

Go to the app tab and generate a consumer key.

<figure><img src="/files/P8uzNqRDfkPQevW11tZC" alt=""><figcaption><p>App key and tokens</p></figcaption></figure>

### User authentication setup

You will need to set up user authentication in the App setting.

<figure><img src="/files/8WVkO5wjzdrUqEHHxxIi" alt=""><figcaption><p>User authentication settings</p></figcaption></figure>

In the authentication setting page, you need to make sure some steps in below.

<div><figure><img src="/files/GTdzjHwiCVJUgP1OCJDc" alt=""><figcaption></figcaption></figure> <figure><img src="/files/RzSGhUnydO8rmS5rgr9s" alt=""><figcaption></figcaption></figure> <figure><img src="/files/XkjoYaWpDMeS3buU7oaU" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
As you can see Twitter need secure HTTP. So I'm used ngrok. <https://ngrok.com/download>
{% endhint %}

That is! Let's move to laravel breeze API and NextJS.

### Laravel Socialite Installation

SocialiteI'm using sail. So let's install socialite with laravel sail through via composer.

```
sail composer require laravel/socialite
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://devsb.gitbook.io/laranotes/tips/twitter-login-with-breeze-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
