> For the complete documentation index, see [llms.txt](https://qubic.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://qubic.gitbook.io/docs/guides/qubic-connect-sdk/third-party-binding.md).

# 第三方帳號綁定

可以將 Prime 存儲在後端伺服器，換取 token 的流程改由後端直接對後端登入，省去每一次要再前端登入 Qubic 服務的流程

{% hint style="danger" %}
請注意，Prime Token 是非常敏感且重要的資訊，若 Prime Token 被洩漏，就可能讓攻擊者取得部分錢包權限。

請將 Prime Token 妥善保管於後端伺服器的資料庫或安全儲存空間中，切勿將 Prime Token 傳至前端或置於非開發者可存取的空間。
{% endhint %}

<figure><img src="/files/6DmzD2AyPNvfeKhLbTNV" alt=""><figcaption></figcaption></figure>

## Example

```typescript
// bind with redirect
qubicConnect.bindWithRedirect();

// when success redirect from url
qubicConnect.onBindTicketResult((bindTicketResult, error) => {
  console.log('example onBindTicketResult');
  if (error) {
    console.log(error?.message);
  }
  console.log({ bindTicketResult });
});
```
