# Link Button on Homescreen on iPhone does not work

**URL:** <https://community.auth0.com/t/link-button-on-homescreen-on-iphone-does-not-work/14967>\
**Category:** Get Help\
**Tags:** swift, homescreen, ios, login\
**Created:** [September 3, 2018, 9:41am UTC](https://community.auth0.com/t/link-button-on-homescreen-on-iphone-does-not-work/14967 "2018-09-03T09:41:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![indianscout](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@indianscout](https://community.auth0.com/u/indianscout)\
**Post date:** [September 3, 2018, 9:41am UTC](https://community.auth0.com/t/link-button-on-homescreen-on-iphone-does-not-work/14967/1 "2018-09-03T09:41:35Z")

</div>

The problem below exists only for iOS devices (Chrom on Andoid works as expected).  
For quick access to my app I want to add a homescreen icons on the desktop. After login on Auth0 I end up on the actual app. Then adding the app to the homescreen cerates an icon but when I try lo launch the app via the homescreen icon the following error apprears:  
{ error: “invalid\_token”, error\_description: “‘state’ does not match”}  
It seems that the URL behind the homescreen icon contains an access\_token/state which is not valid anymore:  
[https://ccm-mobile-staging.herokuapp.com/callback/#access\_token=eyJ0eXAiOiJKV1QiLCJhbGci...&expires\_in=7200&token\_type=Bearer&state=4VQhV3D1uf6sjxJVZ51mqHe.E3nT2KfU](https://ccm-mobile-staging.herokuapp.com/callback/#access_token=eyJ0eXAiOiJKV1QiLCJhbGci...&expires_in=7200&token_type=Bearer&state=4VQhV3D1uf6sjxJVZ51mqHe.E3nT2KfU)  
Did anybody had similar problems with iOS homescreen icons? Any suggestions?

---

<div class="post-metadata">

**Author:** ![indianscout](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@indianscout](https://community.auth0.com/u/indianscout)\
**Post date:** [September 13, 2018, 10:35am UTC](https://community.auth0.com/t/link-button-on-homescreen-on-iphone-does-not-work/14967/2 "2018-09-13T10:35:23Z")

</div>

Solved by programatically removing the GET-params with:  
window.history.pushState({}, document.title, ‘/’);  
window.location.replace(‘/’);

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 31, 2018, 3:53pm UTC](https://community.auth0.com/t/link-button-on-homescreen-on-iphone-does-not-work/14967/3 "2018-12-31T15:53:36Z")

</div>

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