# Redirect URL without a website

**URL:** <https://discuss.dev.twitch.com/t/redirect-url-without-a-website/36135>\
**Category:** API\
**Created:** [January 12, 2022, 6:43pm UTC](https://discuss.dev.twitch.com/t/redirect-url-without-a-website/36135 "2022-01-12T18:43:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![amateurdev](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@amateurdev](https://discuss.dev.twitch.com/u/amateurdev)\
**Post date:** [January 12, 2022, 6:43pm UTC](https://discuss.dev.twitch.com/t/redirect-url-without-a-website/36135/1 "2022-01-12T18:43:10Z")

</div>

My iOS app uses the ‘OAuth implicit code flow’ to authenticate users. Part of the authentication process requires that I enter my website URL to redirect users once they’ve logged into Twitch. Since I don’t have my own website, can I use any random website as a redirect url (for example [google.com](http://google.com)) and scrape off the access token returned in the URL? If not, what are my alternatives to do this process without my own website. Thank you.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [January 12, 2022, 6:44pm UTC](https://discuss.dev.twitch.com/t/redirect-url-without-a-website/36135/2 "2022-01-12T18:44:24Z")

</div>

> [@amateurdev](#):
>
> can I use any random website as a redirect url (for example [google.com](http://google.com)) and scrape off the access token returned in the URL?

Not advised as then you’d potentially leak the URL to that random website…  
It should be a page that you control.

Otherwise `http://localhost/` should do the trick.

---

<div class="post-metadata">

**Author:** ![amateurdev](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@amateurdev](https://discuss.dev.twitch.com/u/amateurdev)\
**Post date:** [January 12, 2022, 6:58pm UTC](https://discuss.dev.twitch.com/t/redirect-url-without-a-website/36135/3 "2022-01-12T18:58:12Z")

</div>

I thought [http://localhost/](http://localhost/) was for testing locally. So if I decide to publish my app to the AppStore, when users log in with their twitch accounts, will they be redirected back to my app using [http://localhost/](http://localhost/)?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [January 12, 2022, 6:59pm UTC](https://discuss.dev.twitch.com/t/redirect-url-without-a-website/36135/4 "2022-01-12T18:59:11Z")

</div>

> [@amateurdev](#):
>
> I thought [http://localhost/](http://localhost/) was for testing locally

Nope thats also a valid location.

If for example you give the user a program.  
And that program creates a server on port :80  
Etc

> [@amateurdev](#):
>
> So if I decide to publish my app to the AppStore, when users log in with their twitch accounts, will they be redirected back to my app using [http://localhost/](http://localhost/)?

Sounds feasible!

---

<div class="post-metadata">

**Author:** ![amateurdev](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@amateurdev](https://discuss.dev.twitch.com/u/amateurdev)\
**Post date:** [January 12, 2022, 7:01pm UTC](https://discuss.dev.twitch.com/t/redirect-url-without-a-website/36135/5 "2022-01-12T19:01:55Z")

</div>

Thank you for clarifying!

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [February 11, 2022, 7:02pm UTC](https://discuss.dev.twitch.com/t/redirect-url-without-a-website/36135/6 "2022-02-11T19:02:42Z")

</div>

Closed on February 11, 2022, 7:02pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
