Giter Site home page Giter Site logo

Comments (2)

idc77 avatar idc77 commented on June 12, 2024
import { boot } from 'quasar/wrappers'
import VueKeyCloak from '@dsb-norge/vue-keycloak-js'
import axios from 'axios'

export default boot(async ({ app }) => {
  async function tokenInterceptor () {
    axios.interceptors.request.use(config => {
      config.headers.Authorization = `Bearer ${app.config.globalProperties.$keycloak.token}`
      return config
    }, error => {
      return Promise.reject(error)
    })
  }

  return new Promise(resolve => {
    app.use(VueKeyCloak, {
      init: {
        onLoad: 'check-sso',
        flow: 'standard',
        pkceMethod: 'S256',
        silentCheckSsoRedirectUri: window.location.origin + '/silent-check-sso.html',
        checkLoginIframe: false,
        scope: 'openid email profile roles',
      },
      config: {
        url: process.env.KEYCLOAK_URL,
        realm: process.env.KEYCLOAK_REALM,
        clientId: process.env.KEYCLOAK_CLIENTID
      },
      onInitError: (error, err) => {
        console.error(error, err)
      },
      onReady: () => {
        tokenInterceptor()
        resolve()
      }
    })
  })
})

The error is "login_required"

This is in the dev console

Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'attribution-reporting'.
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'run-ad-auction'.
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'join-ad-interest-group'.
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'browsing-topics'.
client-entry.js:49 [Quasar] Running PWA.
recipes#iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&error=login_required&state=59e73fa7-c9e8-45e4-847f-3fe410d2e913&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&state=30a14fdd-bd3b-4145-80c9-2cd567f60076&session_state=2789dff3-185a-4d11-aa5a-e6bd48ecf108&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&code=ed682ebf-682b-4bb3-8ecd-09964ea13344.2789dff3-185a-4d11-aa5a-e6bd48ecf108.70b39f4c-395f-491c-bda7-f1c4e4651e62:1 Third-party cookie will be blocked. Learn more in the Issues tab.
recipes#iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&error=login_required&state=59e73fa7-c9e8-45e4-847f-3fe410d2e913&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&state=30a14fdd-bd3b-4145-80c9-2cd567f60076&session_state=2789dff3-185a-4d11-aa5a-e6bd48ecf108&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&code=ed682ebf-682b-4bb3-8ecd-09964ea13344.2789dff3-185a-4d11-aa5a-e6bd48ecf108.70b39f4c-395f-491c-bda7-f1c4e4651e62:1 Third-party cookie will be blocked. Learn more in the Issues tab.
recipes#iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&error=login_required&state=59e73fa7-c9e8-45e4-847f-3fe410d2e913&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&state=30a14fdd-bd3b-4145-80c9-2cd567f60076&session_state=2789dff3-185a-4d11-aa5a-e6bd48ecf108&iss=https%3A%2F%2Fconnect.icod.de%2Fauth%2Frealms%2Fcooksbooks&code=ed682ebf-682b-4bb3-8ecd-09964ea13344.2789dff3-185a-4d11-aa5a-e6bd48ecf108.70b39f4c-395f-491c-bda7-f1c4e4651e62:1 Third-party cookie will be blocked. Learn more in the Issues tab.
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'attribution-reporting'.
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'run-ad-auction'.
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'join-ad-interest-group'.
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'browsing-topics'.
connect.icod.de/auth/realms/cooksbooks/protocol/openid-connect/3p-cookies/step1.html:39 requestStorageAccess: May not be used in an insecure context.
hasStorageAccess @ connect.icod.de/auth/realms/cooksbooks/protocol/openid-connect/3p-cookies/step1.html:39
await in hasStorageAccess (async)
checkStorageAccess @ connect.icod.de/auth/realms/cooksbooks/protocol/openid-connect/3p-cookies/step1.html:12
(anonymous) @ connect.icod.de/auth/realms/cooksbooks/protocol/openid-connect/3p-cookies/step1.html:8
keycloak.js:31 Error: Failure during initialization of keycloak-js adapter
    at @dsb-norge_vue-keycloak-js.js?v=1d1799c6:2194:19 {error: 'login_required', error_description: undefined}error: "login_required"error_description: undefined[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()__proto__: (...)get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()
onInitError @ keycloak.js:31
(anonymous) @ @dsb-norge_vue-keycloak-js.js?v=1d1799c6:2195
Promise.catch (async)
init @ @dsb-norge_vue-keycloak-js.js?v=1d1799c6:2192
(anonymous) @ @dsb-norge_vue-keycloak-js.js?v=1d1799c6:2097
Promise.then (async)
(anonymous) @ @dsb-norge_vue-keycloak-js.js?v=1d1799c6:2096
fulfilled @ @dsb-norge_vue-keycloak-js.js?v=1d1799c6:2061
Promise.then (async)
step @ @dsb-norge_vue-keycloak-js.js?v=1d1799c6:2074
(anonymous) @ @dsb-norge_vue-keycloak-js.js?v=1d1799c6:2076
__awaiter @ @dsb-norge_vue-keycloak-js.js?v=1d1799c6:2058
install @ @dsb-norge_vue-keycloak-js.js?v=1d1799c6:2084
use @ chunk-6YZ7MJAX.js?v=1d1799c6:5301
(anonymous) @ keycloak.js:16
(anonymous) @ keycloak.js:15
start @ client-entry.js:92
await in start (async)
(anonymous) @ client-entry.js:163
Promise.then (async)
(anonymous) @ client-entry.js:161
Promise.then (async)
(anonymous) @ client-entry.js:137

from vue-keycloak-js.

baltom avatar baltom commented on June 12, 2024

Im running the same version of Chrome, but we are running redhat-sso and therefor an older version of keycloak (also using 2.3.0 of vue-keycloak-js - not latest - because of keycloak-js version). And im not experiencing the issue you have.

image
https://developers.google.com/privacy-sandbox/3pcd/related-website-sets-integration
You sure your permission haven't been denied somehow?

The file it's referencing the error from is a file located on your keycloak server/application https://github.com/keycloak/keycloak/blob/main/services/src/main/resources/org/keycloak/protocol/oidc/endpoints/3p-cookies-step1.html

from vue-keycloak-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.