oidc-client.js throws an error stating that no authority was provided

As someone new to SSO, I have recently been immersed in a project that utilizes OIDC. My focus has been on using oidc-client to address the issues at hand. Below are my settings (with some details redacted for privacy).

var mgr = new Oidc.UserManager({
    userStore: new Oidc.WebStorageStateStore({ store: window.localStorage }),
    metadata: {
      issuer: 'https://foo.com/',
      authorization_endpoint: 'https://foo.com/',
      userinfo_endpoint: 'https://foo.com/',
      end_session_endpoint: 'https://foo.com/',
      jwks_uri: 'https://foo.com/'
    },
    keys: [
      {
        'kty': 'RSA',
        'kid': 'some info',
        'use': 'some info',
        'n': 'some info',
        'e': 'some info'
      }
    ],
    client_id: 'aaaaa',
    redirect_uri: 'https://foo.com/',
    response_type: 'id_token token',
    scope: 'openid'
  })
  Oidc.Log.logger = console
  Oidc.Log.level = Oidc.Log.INFO
  mgr.signinRedirect()
    .then(function () { console.log('Hello') }).catch(function (err) {
      console.log(err)
    })

However, I encountered an issue where it did not redirect to the authorization_endpoint as expected. Instead, an error was raised:

oidc-client.min.js?dd17:1 SigninRequest.ctor: No authority passed error @ oidc-client.min.js?dd17:1 SigninRequest @ oidc-client.min.js?dd17:3 (anonymous) @ oidc-client.min.js?dd17:3 Promise.then (async) createSigninRequest @ oidc-client.min.js?dd17:3 (anonymous) @ oidc-client.min.js?dd17:3 Promise.then (async) _signinStart @ oidc-client.min.js?dd17:3 signinRedirect @ oidc-client.min.js?dd17:3 onSubmit @ HelloWorld.vue?140d:71 click @ HelloWorld.vue?1f3f:21 invoker @ vue.runtime.esm.js?2b0e:2023 fn._withTask.fn._withTask @ vue.runtime.esm.js?2b0e:1822

I am working within a vue-cli environment, but I do not believe this is the root cause of the problem. If anyone has faced a similar issue and found a solution, please share your insights. Thank you.

Answer №1

For information on the necessary configurations, please visit https://github.com/IdentityModel/oidc-client-js/wiki

Required Configurations

  • authority (string): The URL of the OIDC/OAuth2 provider.

Based on the error message and your code, it appears that the authority setting is missing.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Is it possible to develop in React without using webpack, relying solely on Gulp instead?

Although I appreciate some aspects of Webpack, my enthusiasm for it wanes as the configuration files grow beyond 15 lines. It becomes overly cryptic, difficult to configure, and time-consuming. Therefore, I tend to reserve its use for just a couple of task ...

What's causing the problem with my custom filter?

I've encountered an issue with a custom filter I'm currently working on. The challenge lies in the fact that I'm using Angular 1.3.6 and am unable to upgrade at the moment. Therefore, I truly need your assistance with this matter. Check out ...

steps for including preset text in an input field within a form on WordPress

I am currently utilizing a WordPress plugin that automatically generates a form in the admin area based on user input. The form includes five fields that require URL validation. Users have the option to enter optional link text which will be displayed as t ...

How can I change the color of a designated column in a Google stacked bar chart by clicking a button?

I am in the process of creating a website that compares incoming students at my university across different academic years. We have successfully implemented a pie chart to display data for the selected year. Now, we aim to include a stacked bar chart next ...

Retrieving client information through the use of WebSockets

I am currently in the process of developing a collaborative sketchpad for multiple users, but I am facing challenges with maintaining an updated list of all connected users. My main goal is to effectively notify existing clients about new connections and p ...

Guidance on utilizing Vuetify's "Select" dropdown list in Nuxt.js and Vue.js

When using nuxt.js in my form with a Vuetify "Select" Dropdown list, the dropdown items are not showing. How can I fix this error? <v-col class="d-flex" cols="12" sm="6" > <v-select :items="items" v-mode ...

Exploring Zustand through Laravel validation errorsUnderstanding Zustand can be

I'm currently working on incorporating Zustand into my NextJS application. I have set up a Laravel endpoint for user login functionality. When there are validation errors, the endpoint sends back JSON in the following format: { "message" ...

What is the best way to access a specific attribute of an HTML element?

Within my ng-repeat loop, I have set a custom attribute like this: <div ng-repeat="item in itemsList" stepType="{{item.stepType}}"> {{item.itemValue}} </div> The possible values for item.stepType are 'task' or 'action ...

Updating user data with Firebase cloud functions

For my e-commerce project, I am looking to utilize the Google Maps API to input the location of a user's shop. I have successfully utilized Google Cloud Functions to insert the latitude, longitude, and address data. Currently, the data can be insert ...

utilizing a spacemouse in conjunction with autodesk forge

Recently, I acquired a 3dconnexion spacemouse and have been attempting to configure it to work with the forge viewer. Fortunately, I came across some JS samples in the SDK for three.js that worked flawlessly. It seems both forge and three.js utilize webgl ...

Utilizing jQuery AJAX to efficiently handle branching based on the result received

I've successfully set up my first AJAX call with jQuery. The only thing left to do is to check the result from the PHP page for any database errors and display an error message if necessary. Here's the current Javascript code: <script type=" ...

An issue arises when data from the parent ajax call is being referenced

I am encountering a situation where I have nested ajax functions within each other. $.ajax({ url: '../...', type: 'POST', dataType: 'JSON', ...

Guide on making a JavaScript button with both "light and dark" modes

Currently, I am attempting to change the color scheme of the page by adjusting the :root variables using a function called changeBackgrondColor(). This function is then assigned to the fontAwesome moon "button". However, when I click on the moon, the pag ...

transforming JSON information into tables on a webpage

Can someone help me with the challenge of incorporating a massive JSON file into an HTML table? I am encountering an issue where I continuously receive the error message Uncaught TypeError: v.forEach is not a function. Any guidance would be greatly appreci ...

SecretKey is not valid, FirebaseError code: 400

Currently, my backend is powered by Firebase. However, when I initiate it using NODE_ENV=debug firebase emulators:start --inspect-functions, the following messages are displayed: emulators: Starting emulators: auth, functions, storage ⚠ functions: Ru ...

Getting the URL of the page before in Vue Router - a quick guide

Is there a way to retrieve the previous page link or URL in vue-router? I am trying to achieve this. Any guidance on how to do it? const link = this.$router.getPrevLink(); // Is there such a function? this.$router.push(link); A similar concept is using t ...

Mysterious line appearing beneath alternate rows in Table with border-collapse and border-spacing applied. Unable to pinpoint the culprit property causing the issue

After searching for a solution to add space between the rows in my table, I finally found the answer on Stack Overflow. The implementation seemed to work fine at first glance, but upon closer inspection, I noticed an issue depicted in the screenshot below: ...

Encountering difficulties in accessing state while utilizing async callback functions in React.js

After finding this function on Stack Overflow, I decided to use it in order to update a database and profile information immediately after a user signs up. The function is working as expected, but I am encountering an issue where I can no longer access the ...

Leveraging AngularJS $filter in conjunction with ng-disabled

I have a variable in my $scope that contains information about an election, including a list of voters with unique IDs: $scope.election = { voters: [ { _id: '123' }, { _id: '456' }, { _id: '789' } ] } Additio ...

Stopping an endless loop in JavaScript by pressing a key on the keyboard can be a useful

I've been working on creating a JavaScript game and am currently tackling the challenge of implementing gravity. One crucial aspect I need to address is creating an infinite loop without causing the browser to crash. Is there a way for me to include a ...