# AUTH: Generate Federation Token

This endpoint allows a logged in user to use their bearer token to generate a web-link that automatically logs them into the web-interface of the platform. This can be useful when needing to switch to web-only modals (KYC Systems, Payment Interfaces, etc.) while still retaining the user session context.

The returned Federation Token can be used to call the platform's login page with an optional redirect parameter:

```
https://portal.platform.com/login?token=TGUzZ1JiY0Z0RzBMcU5XRE9RbjVaTjdu&redirect=/account/some/widget
```

{% hint style="info" %}
Note: Federation Tokens automatically expire 1 minute after creation.
{% endhint %}

## AUTH: Generate Web-Federation Token

> This endpoint allows a logged in user to use their bearer token to generate a web-link that automatically logs them into the web-interface of the platform. This can be useful when needing to switch to web-only modals (KYC Systems, Payment Interfaces, etc.) while still retaining the user session context.\
> \
> The returned Federation Token can be used to call the platform's login page with an optional redirect parameter:\
> \
> \[\<b><https://portal.platform.com/login?token=TGUzZ1JiY0Z0RzBMcU5XRE9RbjVaTjdu\\&amp;redirect=/account/some/widget\\></b>]\(<https://portal.platform.com/login?token=TGUzZ1JiY0Z0RzBMcU5XRE9RbjVaTjdu\\&redirect=/account/some/widget)\\>
> \
> Note: Federation Tokens automatically expire 1 minute after creation.

```json
{"openapi":"3.0.0","info":{"title":"Hybrid-Chain API Documentation and Specification","version":"1.0.0"},"servers":[{"url":"https://api.hybrid-chain.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/auth/federate":{"get":{"tags":["Authentication"],"summary":"AUTH: Generate Web-Federation Token","description":"This endpoint allows a logged in user to use their bearer token to generate a web-link that automatically logs them into the web-interface of the platform. This can be useful when needing to switch to web-only modals (KYC Systems, Payment Interfaces, etc.) while still retaining the user session context.\n\nThe returned Federation Token can be used to call the platform's login page with an optional redirect parameter:\n\n[<b>https://portal.platform.com/login?token=TGUzZ1JiY0Z0RzBMcU5XRE9RbjVaTjdu&amp;redirect=/account/some/widget</b>](https://portal.platform.com/login?token=TGUzZ1JiY0Z0RzBMcU5XRE9RbjVaTjdu&redirect=/account/some/widget)\n\nNote: Federation Tokens automatically expire 1 minute after creation.","responses":{"200":{"description":"OK","headers":{"Server":{"schema":{"type":"string"}},"Date":{"schema":{"type":"string"}},"Content-Type":{"schema":{"type":"string"}},"Content-Length":{"schema":{"type":"integer"}},"Cache-Control":{"schema":{"type":"string"}},"Connection":{"schema":{"type":"string"}},"keep-alive":{"schema":{"type":"string"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Set-Cookie":{"schema":{"type":"string"}},"Vary":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```
