# Allow access to single page in app?

**URL:** <https://community.auth0.com/t/allow-access-to-single-page-in-app/7142>\
**Category:** Get Help\
**Tags:** page, allow, authentication\
**Created:** [June 20, 2017, 4:34am UTC](https://community.auth0.com/t/allow-access-to-single-page-in-app/7142 "2017-06-20T04:34:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cesarxp2](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@cesarxp2](https://community.auth0.com/u/cesarxp2)\
**Post date:** [June 20, 2017, 4:34am UTC](https://community.auth0.com/t/allow-access-to-single-page-in-app/7142/1 "2017-06-20T04:34:43Z")

</div>

Hey guys,  
My website is currently only accessible by login in through Auth0 but I want to make a single page accessible without authentication, a way for anyone to type in a specific URL and not have to log in. How can I do this?

Thanks

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [June 20, 2017, 5:23am UTC](https://community.auth0.com/t/allow-access-to-single-page-in-app/7142/2 "2017-06-20T05:23:01Z")

</div>

You need to provide more information for anyone to be able to help you.

- What type of app is it? SPA? Regular web app?
- What framework/technologies is it using?
- What Auth0 SDK’s are you using?

---

<div class="post-metadata">

**Author:** ![cesarxp2](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@cesarxp2](https://community.auth0.com/u/cesarxp2)\
**Post date:** [June 20, 2017, 5:29am UTC](https://community.auth0.com/t/allow-access-to-single-page-in-app/7142/3 "2017-06-20T05:29:33Z")

</div>

1. It’s an SPA
2. I am using AngularJs
3. Angular-JWT, auth0-lock

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [June 20, 2017, 5:42am UTC](https://community.auth0.com/t/allow-access-to-single-page-in-app/7142/4 "2017-06-20T05:42:46Z")

</div>

Please refer to the Quickstart: [https://auth0.com/docs/quickstart/spa/angularjs/04-authorization#protect-client-side-routes](https://auth0.com/docs/quickstart/spa/angularjs/04-authorization#protect-client-side-routes)

To protect a route, you define a function to check authentication, then call this `onEnter`. To leave a route unprotected, simply don’t call this in the `onEnter` hook:

```
$stateProvider
  // ...
  .state('ping', {
    url: '/ping',
    controller: 'PingController',
    templateUrl: 'app/ping/ping.html',
    controllerAs: 'vm',
    onEnter: checkAuthentication // This protects the route. Simply don't call this to leave it unprotected.
  })

// ...

function checkAuthentication($transition$) {
  var $state = $transition$.router.stateService;
  var auth = $transition$.injector().get('authService');
  if (!auth.isAuthenticated()) {
    return $state.target('home');
  }
}

```

---

<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:54am UTC](https://community.auth0.com/t/allow-access-to-single-page-in-app/7142/5 "2018-03-02T05:54:46Z")

</div>


