Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: identity widget conflicts with implicit OAuth #1690

Closed
BigGold1310 opened this issue Aug 29, 2018 · 7 comments
Closed

docs: identity widget conflicts with implicit OAuth #1690

BigGold1310 opened this issue Aug 29, 2018 · 7 comments

Comments

@BigGold1310
Copy link

Describe the bug
Logging in doesn't work.
If i klick on the "Login with GitLab" button I get asked for the GitLab credentials and after that i get redirected to the page an a error occurs: "Not Found" shows up. (I'm not logged in so I'm still hanging on the login screen.

To Reproduce
Setting up a netlify cms instance with GitLab Implicit authentication.

Expected behavior
Successfully login, redirect to the Editor/Content/CMS View.

Screenshots
Error Screen:
netlifycms-firefox-error

Browser Console Error Log:

Error: "Gotrue-js: Failed to parse tokenResponse claims: {"access_token":"c006da9f51f131415bc41ffbd8083137c17aac90f480d701d605bd0c2f24c7f9","token_type":"bearer","state":"2bb47e3d-804e-4444-8a27-5de3793f01ba"}"
valuehttps://identity.netlify.com/v1/netlify-identity-widget.js:1:94536ehttps://identity.netlify.com/v1/netlify-identity-widget.js:1:92597valuehttps://identity.netlify.com/v1/netlify-identity-widget.js:1:89826completeExternalLoginhttps://identity.netlify.com/v1/netlify-identity-widget.js:1:113346bhttps://identity.netlify.com/v1/netlify-identity-widget.js:1:11476nhttps://identity.netlify.com/v1/netlify-identity-widget.js:1:11363shttps://identity.netlify.com/v1/netlify-identity-widget.js:1:80471onloadhttps://identity.netlify.com/v1/netlify-identity-widget.js:1:81292 user.js:153:8
	value user.js:153:8
	e user.js:37:4
	value index.js:147:17
	o.completeExternalLogin< store.js:100:2
	b mobx.module.js:911:15
	n mobx.module.js:902:15
	s netlify-identity.js:178:4
	u/O.onload netlify-identity.js:217:4

Applicable Versions:

  • Netlify CMS version: ^2.0.0 / 2.0.11
  • Git provider: GitLab
  • OS: Windows 10
  • Browser version: Firefox 61.0.2

CMS configuration

backend:
  name: gitlab
  repo: user/repo# Path to your GitLab repository
  auth_type: implicit # Required for implicit grant
  app_id: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # Application ID from your GitLab settings
  branch: master # Branch to update (optional; defaults to master)
  
media_folder: "static/img" # Folder where user uploaded files should go
public_folder: "img"




collections:
  - name: "slider" # Used in routes
    label: "Slider" # Used in the UI
    folder: "data/carousel" # The path to the folder where the documents are stored
    create: true # Allow users to create new documents in this collection
    slug: "slider-{{slug}}" # Filename template
    fields: # The fields for each document, usually in front matter
      - {label: "Weight", name: "weight", widget: "number", default: "0"}
      - {label: "Title", name: "title", widget: "string"}
      - {label: "Description", name: "description", widget: "string"}
      - {label: "Bild", name: "image", widget: "image"}

Additional context
Works with Chrome: Version 68.0.3440.106

@tech4him1
Copy link
Contributor

You will need to remove the Identity script (netlify-identity-widget.js) from your site -- it conflicts with implicit authentication and is unnecessary.

If you think there is a good place to note that in the docs, please open a PR!

@tech4him1 tech4him1 reopened this Aug 30, 2018
@erquhart
Copy link
Contributor

erquhart commented Sep 4, 2018

We could mention under GitLab backend docs - there should be a section for each extension once https://github.com/netlify/netlify-cms/issues/1692 is in play (very early on atm).

@tech4him1 tech4him1 changed the title Error with Firefox 61.0.2 docs: identity widget conflicts with implicit OAuth Sep 4, 2018
@ayedo
Copy link

ayedo commented Feb 19, 2019

Hello! This might be a very beginner question, and I already apologize for that but: I'm not sure how to remove the identity script from my site?
I'm using gatsby, with the gatsby netify plugin, so most of the site is being generated, and scrumbled into a single big js file.

@ayedo
Copy link

ayedo commented Feb 19, 2019

Nevermind, I figured it out. The way to do it is to configure the gatsby-netlify-plugin in the gatsby-config.js, like so:

    options: {
      enableIdentityWidget: false,
    }

jbialobr added a commit to jbialobr/gatsby that referenced this issue Mar 31, 2019
As per comment decaporg/decap-cms#1690 (comment)
Identity widget conflicts with implicit authentication and should be disabled.
LekoArts added a commit to gatsbyjs/gatsby that referenced this issue Apr 1, 2019
## Description

As per comment decaporg/decap-cms#1690 (comment)
Identity widget conflicts with implicit authentication and should be disabled.




Co-authored-by: Lennart <lekoarts@gmail.com>
@sakihayashi
Copy link

I had exactly the same issue by using Gatsby, Netlify-CMS and Auth0 and the solution worked.

{
resolve: gatsby-plugin-netlify-cms,
options: {
enableIdentityWidget: false,
}
}

It's working perfect now. thanks.

@fabianrios
Copy link

could someone add this to the gitlab documentation is a waste of time people trying to figure it out on there own

@erezrokah
Copy link
Contributor

Hey @fabianrios changing the docs won't be required once:
#2920
netlify/netlify-identity-widget#223

are merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants