# \#javascript

**URL:** https://community.auth0.com/tag/javascript/85.md

[Latest](https://community.auth0.com/latest.md) · [Categories](https://community.auth0.com/categories.md) · [Tags](https://community.auth0.com/tags.md)

---

## [Unable to load the auth-spa-js script inside chrome extension](https://community.auth0.com/t/unable-to-load-the-auth-spa-js-script-inside-chrome-extension/94165)

<div class="topic-metadata">

**Author:** [@kumarayush6543](https://community.auth0.com/u/kumarayush6543)\
**Replies:** 1\
**Last updated:** [November 10, 2022, 1:21pm UTC](https://community.auth0.com/t/unable-to-load-the-auth-spa-js-script-inside-chrome-extension/94165 "2022-11-10T13:21:10Z")

</div>

Hi, I have been trying to load the script file of auth-spa-js, but it shows the error. index.html:1 Refused to load the script 'https://cdn.auth0.com/js/auth0-spa-js/1.2/auth0-spa-js.production.js' because…

---

## [Silly qn re a rule to fire a zap](https://community.auth0.com/t/silly-qn-re-a-rule-to-fire-a-zap/88279)

<div class="topic-metadata">

**Author:** [@colm](https://community.auth0.com/u/colm)\
**Replies:** 1\
**Last updated:** [August 26, 2022, 8:41pm UTC](https://community.auth0.com/t/silly-qn-re-a-rule-to-fire-a-zap/88279 "2022-08-26T20:41:20Z")

</div>

I’m implementing this: Auth0 Actions WIthin it is the below snippet: request.post({ url : configuration.ZAP\_HOOK\_URL, json: payload\_to\_zap How exactly should the url look if I replace ZAP\_HOOK\_URL?? If I just drop …

---

## [Token refresh does not work in \`auth0-spa-js\`](https://community.auth0.com/t/token-refresh-does-not-work-in-auth0-spa-js/86051)

<div class="topic-metadata">

**Author:** [@ivk](https://community.auth0.com/u/ivk)\
**Replies:** 3\
**Last updated:** [July 19, 2022, 12:51pm UTC](https://community.auth0.com/t/token-refresh-does-not-work-in-auth0-spa-js/86051 "2022-07-19T12:51:38Z")

</div>

Issue: Token refresh does not work in auth0-spa-js Description: The auth0-spa-js can be configured to refresh tokens (useRefreshTokens flag). When an access token is expired getTokenSilently() tries to refresh it aut…

---

## [Passing query params with auth0-next js?](https://community.auth0.com/t/passing-query-params-with-auth0-next-js/82455)

<div class="topic-metadata">

**Author:** [@chemmso](https://community.auth0.com/u/chemmso)\
**Replies:** 1\
**Last updated:** [April 27, 2022, 5:21pm UTC](https://community.auth0.com/t/passing-query-params-with-auth0-next-js/82455 "2022-04-27T17:21:58Z")

</div>

So, I ended up getting stuck on this nextjs project and my knowledge of next and JS is extremely minimal as is my auth0 knowledge. I was wondering if anyone could suggest how to pass query parameters to the first block o…

---

## [Next.js Practical Introduction: Navigation and Routing](https://community.auth0.com/t/next-js-practical-introduction-navigation-and-routing/28758)

<div class="topic-metadata">

**Author:** [@ramiro](https://community.auth0.com/u/ramiro)\
**Replies:** 13\
**Last updated:** [July 29, 2020, 11:11am UTC](https://community.auth0.com/t/next-js-practical-introduction-navigation-and-routing/28758 "2020-07-29T11:11:04Z")

</div>

Next.js Practical Introduction: Navigation and Routing. Learn how to use Next.js to add navigation and routing to server-side rendered React applications. Read on :confetti\_ball: Brought to you by @dan-auth0 :man\_tech…

---

## [Next.js Practical Introduction: Styling and Theming](https://community.auth0.com/t/next-js-practical-introduction-styling-and-theming/28397)

<div class="topic-metadata">

**Author:** [@ramiro](https://community.auth0.com/u/ramiro)\
**Replies:** 6\
**Last updated:** [May 26, 2020, 7:47pm UTC](https://community.auth0.com/t/next-js-practical-introduction-styling-and-theming/28397 "2020-05-26T19:47:54Z")

</div>

In this tutorial series, you’ll be provided with a practical introduction to how Next.js can help you build web applications. Part 2: Styling and Theming Brought to you by @dan-auth0 :man\_technologist:t2:

---

## [JavaScript: What's New in ECMAScript 2020](https://community.auth0.com/t/javascript-whats-new-in-ecmascript-2020/43206)

<div class="topic-metadata">

**Author:** [@robertino.calcaterra](https://community.auth0.com/u/robertino.calcaterra)\
**Replies:** 3\
**Last updated:** [May 19, 2020, 7:13am UTC](https://community.auth0.com/t/javascript-whats-new-in-ecmascript-2020/43206 "2020-05-19T07:13:09Z")

</div>

New exciting features are coming for JavaScript! Learn the new features introduced by ECMAScript 2020 in JavaScript. Read on Brought to you by @andrea.chiarelli

---

## [A Guide to Angular 8's Differential Loading](https://community.auth0.com/t/a-guide-to-angular-8s-differential-loading/26466)

<div class="topic-metadata">

**Author:** [@ramiro](https://community.auth0.com/u/ramiro)\
**Replies:** 3\
**Last updated:** [February 12, 2020, 4:42pm UTC](https://community.auth0.com/t/a-guide-to-angular-8s-differential-loading/26466 "2020-02-12T16:42:18Z")

</div>

Angular 8 now sends separate bundles to legacy browsers by default. Learn more about this new Angular feature, differential loading, in this article. Brought to you by @sam.julien :man\_technologist:t2: Read on …

---

## [Beyond JavaScript Frameworks: Universal Login Button Component](https://community.auth0.com/t/beyond-javascript-frameworks-universal-login-button-component/36045)

<div class="topic-metadata">

**Author:** [@ramiro](https://community.auth0.com/u/ramiro)\
**Replies:** 1\
**Last updated:** [January 9, 2020, 10:35am UTC](https://community.auth0.com/t/beyond-javascript-frameworks-universal-login-button-component/36045 "2020-01-09T10:35:16Z")

</div>

Learn how to use Web Components technologies to build a login button that works in any JavaScript framework. Read on :wrench: Brought to you by @andrea.chiarelli :man\_technologist:t2:

---

## [CORS Tutorial: A Guide to Cross-Origin Resource Sharing](https://community.auth0.com/t/cors-tutorial-a-guide-to-cross-origin-resource-sharing/24034)

<div class="topic-metadata">

**Author:** [@ramiro](https://community.auth0.com/u/ramiro)\
**Replies:** 5\
**Last updated:** [May 16, 2019, 1:41pm UTC](https://community.auth0.com/t/cors-tutorial-a-guide-to-cross-origin-resource-sharing/24034 "2019-05-16T13:41:20Z")

</div>

Learn all about Cross-Origin Resource Sharing, how it protects you, and how to enable CORS in your applications Read on :hammer\_and\_wrench: \>\> What is CORS? Complete Tutorial on Cross-Origin Resource Sharing

---

## [Creating Web Components with Stencil](https://community.auth0.com/t/creating-web-components-with-stencil/42638)

<div class="topic-metadata">

**Author:** [@andrea.chiarelli](https://community.auth0.com/u/andrea.chiarelli)\
**Replies:** 7\
**Last updated:** [November 22, 2021, 2:16pm UTC](https://community.auth0.com/t/creating-web-components-with-stencil/42638 "2021-11-22T14:16:07Z")

</div>

Learn how to use Stencil to build Web Components and use them in any JavaScript framework! Read on :hammer\_and\_wrench: Brought to you by @andrea.chiarelli :man\_technologist:

---

## [Deno API? Worth adapting existing NodeJS sdk?](https://community.auth0.com/t/deno-api-worth-adapting-existing-nodejs-sdk/70537)

<div class="topic-metadata">

**Author:** [@viztastic](https://community.auth0.com/u/viztastic)\
**Replies:** 1\
**Last updated:** [October 1, 2021, 11:13am UTC](https://community.auth0.com/t/deno-api-worth-adapting-existing-nodejs-sdk/70537 "2021-10-01T11:13:00Z")

</div>

Is therer a plan or timeline to adapt the NodeJS api to work with Deno? Deno is growing super quickly and other Authentication libraries are taking advantage of the vacuum. Might be a good time for Auth0 to consider rel…

---

## [Bug report: Script error when logon via MS Word](https://community.auth0.com/t/bug-report-script-error-when-logon-via-ms-word/48747)

<div class="topic-metadata">

**Author:** [@Mol](https://community.auth0.com/u/Mol)\
**Replies:** 0\
**Last updated:** [August 27, 2020, 8:22am UTC](https://community.auth0.com/t/bug-report-script-error-when-logon-via-ms-word/48747 "2020-08-27T08:22:55Z")

</div>

I experience a problem when I use MS Word to logon using Auth0. I use Chrome to logon to my application but the application uses MS Word for editing documents. This causes Word to open an Internet Explorer window with th…

---

## [Need help converting Javascript JWT parsing into Java using Auth0 libs](https://community.auth0.com/t/need-help-converting-javascript-jwt-parsing-into-java-using-auth0-libs/47387)

<div class="topic-metadata">

**Author:** [@jackiegleason](https://community.auth0.com/u/jackiegleason)\
**Replies:** 1\
**Last updated:** [August 4, 2020, 2:06pm UTC](https://community.auth0.com/t/need-help-converting-javascript-jwt-parsing-into-java-using-auth0-libs/47387 "2020-08-04T14:06:33Z")

</div>

Hey everyone, Currently I am using the node-jsonwebtoken lib you guys put out to parse my JWT access token. I do this like… jwt.verify(accessToken, cert, { algorithms : "RSA256" }).then((err, parsed) =\>{...}); I would…

---

## [Access Hook-created app\_metadata (Javascript)](https://community.auth0.com/t/access-hook-created-app-metadata-javascript/18538)

<div class="topic-metadata">

**Author:** [@chisnallio](https://community.auth0.com/u/chisnallio)\
**Replies:** 8\
**Last updated:** [December 6, 2018, 12:02pm UTC](https://community.auth0.com/t/access-hook-created-app-metadata-javascript/18538 "2018-12-06T12:02:52Z")

</div>

So I created a pre-registration hook: module.exports = function (user, context, cb) { var response = {}; // External packages uniqid = require(‘uniqid’); keygen = require(‘keygenerator’); // Add app metadata to th…

---

## [How to implement Vue.js 2, Cordova, and Auth0?](https://community.auth0.com/t/how-to-implement-vue-js-2-cordova-and-auth0/9114)

<div class="topic-metadata">

**Author:** [@philharmonic](https://community.auth0.com/u/philharmonic)\
**Replies:** 3\
**Last updated:** [May 2, 2018, 6:01am UTC](https://community.auth0.com/t/how-to-implement-vue-js-2-cordova-and-auth0/9114 "2018-05-02T06:01:06Z")

</div>

I have successfully used the Cordova native example with Auth0 but cannot get it into my Vue.js layout accurately. I am using Framework7, Vue.js, Cordova and Auth0. Any help would be appreciated!!

---

## [Should I share access\_token with Javascript](https://community.auth0.com/t/should-i-share-access-token-with-javascript/9247)

<div class="topic-metadata">

**Author:** [@jeff.espenschied](https://community.auth0.com/u/jeff.espenschied)\
**Replies:** 1\
**Last updated:** [December 14, 2018, 6:01pm UTC](https://community.auth0.com/t/should-i-share-access-token-with-javascript/9247 "2018-12-14T18:01:25Z")

</div>

I have a traditional ASP.NET MVC application that I have configured to authenticate users with Auth0. In that app, I am calling my own API that is also setup with authentication through Auth0. I also want to call that AP…

---

## [Is it possible to use Object.defineProperty in Auth0 Rules?](https://community.auth0.com/t/is-it-possible-to-use-object-defineproperty-in-auth0-rules/9239)

<div class="topic-metadata">

**Author:** [@davi.psr](https://community.auth0.com/u/davi.psr)\
**Replies:** 1\
**Last updated:** [December 14, 2018, 6:00pm UTC](https://community.auth0.com/t/is-it-possible-to-use-object-defineproperty-in-auth0-rules/9239 "2018-12-14T18:00:28Z")

</div>

I’m trying to create the following rule on Auth0: function (user, context, callback) { // TODO: implement your rule var app = 'myAppName'; var obj = {}; Object.defineProperty(obj, app, { roles: 'admin, customer'…

---

## [What version of Javascript is supported in Hooks?](https://community.auth0.com/t/what-version-of-javascript-is-supported-in-hooks/9209)

<div class="topic-metadata">

**Author:** [@dan.rumney](https://community.auth0.com/u/dan.rumney)\
**Replies:** 1\
**Last updated:** [December 14, 2018, 5:46pm UTC](https://community.auth0.com/t/what-version-of-javascript-is-supported-in-hooks/9209 "2018-12-14T17:46:35Z")

</div>

I know, from experience, that Hooks does not support ES6. What version is supported? I’d like to set up an ESLint file to check for problems locally before passing them up to Auth0

---

## [Javascript code for Box API](https://community.auth0.com/t/javascript-code-for-box-api/8835)

<div class="topic-metadata">

**Author:** [@nalinishrma1](https://community.auth0.com/u/nalinishrma1)\
**Replies:** 1\
**Last updated:** [November 28, 2017, 10:44pm UTC](https://community.auth0.com/t/javascript-code-for-box-api/8835 "2017-11-28T22:44:59Z")

</div>

I am trying to connect to get token from Box API in JavaScript. I have try by postman tool and get access token, refresh token and using that. My problem is we have a desktop app which needs to communicate with the box A…

---

## [Javascript Allowed in Auth0 Rules](https://community.auth0.com/t/javascript-allowed-in-auth0-rules/8830)

<div class="topic-metadata">

**Author:** [@picosam1](https://community.auth0.com/u/picosam1)\
**Replies:** 1\
**Last updated:** [November 27, 2017, 5:13pm UTC](https://community.auth0.com/t/javascript-allowed-in-auth0-rules/8830 "2017-11-27T17:13:05Z")

</div>

Can I use string literals (templates) in my Auth0 rule Javascript?

---

## [Auth0 third party cookie and CORS](https://community.auth0.com/t/auth0-third-party-cookie-and-cors/8786)

<div class="topic-metadata">

**Author:** [@simone.casciaroli](https://community.auth0.com/u/simone.casciaroli)\
**Replies:** 1\
**Last updated:** [November 21, 2017, 7:02pm UTC](https://community.auth0.com/t/auth0-third-party-cookie-and-cors/8786 "2017-11-21T19:02:58Z")

</div>

Just to double check that I understood this correctly (I’m so surprised that I want to double check). Reading this Cross-Origin Authentication - Auth0 Docs I understood that the only way to allow any user to authenticat…

---

## [Customise hosted login page to redirect elsewhere for a given email domain](https://community.auth0.com/t/customise-hosted-login-page-to-redirect-elsewhere-for-a-given-email-domain/8748)

<div class="topic-metadata">

**Author:** [@martin.pain](https://community.auth0.com/u/martin.pain)\
**Replies:** 1\
**Last updated:** [November 15, 2017, 5:43pm UTC](https://community.auth0.com/t/customise-hosted-login-page-to-redirect-elsewhere-for-a-given-email-domain/8748 "2017-11-15T17:43:35Z")

</div>

I use a hosted login page, and I’d like to do the following: When the user enters their email address (or when they click log in), if their email address is for a certain domain, I want to redirect them to a different p…

---

## [Jquery refresh access token](https://community.auth0.com/t/jquery-refresh-access-token/8726)

<div class="topic-metadata">

**Author:** [@tomheaps](https://community.auth0.com/u/tomheaps)\
**Replies:** 1\
**Last updated:** [November 13, 2017, 6:57pm UTC](https://community.auth0.com/t/jquery-refresh-access-token/8726 "2017-11-13T18:57:59Z")

</div>

I have built a simple SPA using ONLY jQuery, html and css and am successfully authenticating access to it using auth0. I would like to refresh a users access token automatically but can’t work out how to do this - the S…

---

## [How does one deal with JWT Token Validation from a Javascript client in a Servlet Filter w/o Spring?](https://community.auth0.com/t/how-does-one-deal-with-jwt-token-validation-from-a-javascript-client-in-a-servlet-filter-w-o-spring/8240)

<div class="topic-metadata">

**Author:** [@horsephotostechnolog](https://community.auth0.com/u/horsephotostechnolog)\
**Replies:** 0\
**Last updated:** [September 19, 2017, 9:58am UTC](https://community.auth0.com/t/how-does-one-deal-with-jwt-token-validation-from-a-javascript-client-in-a-servlet-filter-w-o-spring/8240 "2017-09-19T09:58:50Z")

</div>

This example is woefully under documented From this page: Where and how do I get/set the public/private key? When a accessToken is generated in my Javascript client and passed to me? How do I secure a restful endpoi…

---

## [Is is possible to configure the hosted Auth0 login page to work without javascript?](https://community.auth0.com/t/is-is-possible-to-configure-the-hosted-auth0-login-page-to-work-without-javascript/7584)

<div class="topic-metadata">

**Author:** [@jamie.cox](https://community.auth0.com/u/jamie.cox)\
**Replies:** 2\
**Last updated:** [July 21, 2017, 6:18pm UTC](https://community.auth0.com/t/is-is-possible-to-configure-the-hosted-auth0-login-page-to-work-without-javascript/7584 "2017-07-21T18:18:11Z")

</div>

In keeping with the principle of progressive enchancement our accessibility policy requires us to provide the core functionality of our web apps without running javascript in the browser. We want to do OIDC compliant SS…

---

## [RSASHA256 signature based on jwt.io by JavaScript](https://community.auth0.com/t/rsasha256-signature-based-on-jwt-io-by-javascript/7521)

<div class="topic-metadata">

**Author:** [@vinodtiwari10](https://community.auth0.com/u/vinodtiwari10)\
**Replies:** 1\
**Last updated:** [July 17, 2017, 3:22pm UTC](https://community.auth0.com/t/rsasha256-signature-based-on-jwt-io-by-javascript/7521 "2017-07-17T15:22:45Z")

</div>

How we can generate RSASHA256 signature based on jwt.io by JavaScript. I am able to create Header, Payload but unable to create signature as mentioned in jwt.io by JavaScript for RSASHA256. While i am able to do for SHA2…

---

## [How to access the SharePoint REST apis via auth0](https://community.auth0.com/t/how-to-access-the-sharepoint-rest-apis-via-auth0/7213)

<div class="topic-metadata">

**Author:** [@xyzadvaiya](https://community.auth0.com/u/xyzadvaiya)\
**Replies:** 0\
**Last updated:** [June 22, 2017, 8:49pm UTC](https://community.auth0.com/t/how-to-access-the-sharepoint-rest-apis-via-auth0/7213 "2017-06-22T20:49:11Z")

</div>

I want to access the SharePoint list in a single page application using the SharePoint REST (OData) APIs. I tried to enable the SSO using Azure directory so I can access the SharePoint but I can access SharePoint in the…

---

## [What is the best way to update the accessToken in the app with the new accessToken?](https://community.auth0.com/t/what-is-the-best-way-to-update-the-accesstoken-in-the-app-with-the-new-accesstoken/7161)

<div class="topic-metadata">

**Author:** [@15anmy](https://community.auth0.com/u/15anmy)\
**Replies:** 1\
**Last updated:** [June 21, 2017, 12:48am UTC](https://community.auth0.com/t/what-is-the-best-way-to-update-the-accesstoken-in-the-app-with-the-new-accesstoken/7161 "2017-06-21T00:48:12Z")

</div>

\##Before getting to the actual question Alright I have created my own authentication system that I am going to use on my API. Simple explanation: On /signup the user types in username, password etc… the API grants th…

---

## [Widget UI: Redirecting after successful login](https://community.auth0.com/t/widget-ui-redirecting-after-successful-login/6552)

<div class="topic-metadata">

**Author:** [@mcarreiro](https://community.auth0.com/u/mcarreiro)\
**Replies:** 1\
**Last updated:** [May 10, 2017, 9:26am UTC](https://community.auth0.com/t/widget-ui-redirecting-after-successful-login/6552 "2017-05-10T09:26:44Z")

</div>

Hi, I’m having an issue redirecting to my application after a successful login. I’m looking at the following page of documentation: And I’ve tried the following code snippet: lock = new Auth0Lock( AUTH\_LOCK\_KEY,…

[Next page](https://community.auth0.com/tag/javascript/85.md?match_all_tags=true&page=1&tags%5B%5D=javascript)
