# Redirect: false doesn't work first time

**URL:** <https://community.auth0.com/t/redirect-false-doesnt-work-first-time/8918>\
**Category:** Get Help\
**Tags:** no-redirect, redirect\
**Created:** [December 8, 2017, 4:48am UTC](https://community.auth0.com/t/redirect-false-doesnt-work-first-time/8918 "2017-12-08T04:48:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jak000](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jak000](https://community.auth0.com/u/jak000)\
**Post date:** [December 8, 2017, 4:48am UTC](https://community.auth0.com/t/redirect-false-doesnt-work-first-time/8918/1 "2017-12-08T04:48:50Z")

</div>

I’m not sure if I’m making a beginner mistake here, but I’m trying to use lock10 in popup mode in a SPA. It seems to always redirect my app the first time I try to login with google/facebook, but when I come back and try again it uses a popup.

try it here: [Brandmark - make your logo in minutes](http://bit.ly/2j4N6UT)

steps to reproduce:

- on firefox 57.0.1 osx or safari

- open private tab, go to above url

- click on register/login, then google

here’s my code:

```
<script src="https://cdn.auth0.com/js/lock/10.23.1/lock.min.js"></script>
<script>
	  var lock = new Auth0Lock('2yt-Sc9Cv425g3KjjAu89GHbMsym9uqi', 'brandmark.auth0.com', {
		container: 'auth0',
		auth: {
		  redirect: false,
		  responseType: 'token',
		  params: {
			scope: 'openid profile email'
		  }
		}
	  });

window.lock.show({
				  initialScreen: 'signUp',
				  
				  theme: {
					logo: 'https://app.brandmark.io/v2/img/logo.png',
					primaryColor: '#6ECCDF'
				  },
				  languageDictionary: {
					title: "Sign up to save your work"
				  },
				});

```

---

<div class="post-metadata">

**Author:** ![jak000](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jak000](https://community.auth0.com/u/jak000)\
**Post date:** [December 8, 2017, 5:41am UTC](https://community.auth0.com/t/redirect-false-doesnt-work-first-time/8918/2 "2017-12-08T05:41:53Z")

</div>

edit: can also reproduce on safari (in private window)

---

<div class="post-metadata">

**Author:** ![jak000](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jak000](https://community.auth0.com/u/jak000)\
**Post date:** [December 8, 2017, 6:30am UTC](https://community.auth0.com/t/redirect-false-doesnt-work-first-time/8918/3 "2017-12-08T06:30:11Z")

</div>

I still don’t know the cause, but after a few hours of playing with it I found that I have a variable “var name” in the global scope. If I rename this variable the problem goes away…

---

<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:** [March 2, 2018, 5:57am UTC](https://community.auth0.com/t/redirect-false-doesnt-work-first-time/8918/4 "2018-03-02T05:57:41Z")

</div>


