utterance / utterances

:crystal_ball: A lightweight comments widget built on GitHub issues
https://utteranc.es
MIT License
8.7k stars 565 forks source link

During sign in, redirect link does not goes to original page #474

Open ShyRoute opened 3 years ago

ShyRoute commented 3 years ago

Thank you for the good repo!

When I use utterances in my blog, at first it says i need to 'sign in to comment'.

If i click the 'sign in to comment' button, it does not goes to original address and it didn't sign in.

the button's link is https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Fshyroute.github.io%2F

so it goes to my blog's main page, not to its original page, and I can't to sign in for comment.

e.g. if i click the sign in button, its goes to https://shyroute.github.io/?utterances=(some hash string) and it is my blog's main page.

jdanyow commented 3 years ago

Do you have a link to a page on your blog?

offetuoso commented 3 years ago

@jdanyow I also have the same problem.

jekyll _config : permalink: pretty post url https://offetuoso.github.io/foo/bar/2021/02/03/Markdown/

post shin in with github a tag's href is "https://api.utteranc.es/authorize?redirect_uri=http%3A%2F%2Foffetuoso.github.io%2F"

link go to https://offetuoso.github.io/?utterances='parameter'

jekyll _config : /:title/ https://offetuoso.github.io/Markdown/

same too,

i need help 😅

jdanyow commented 3 years ago

@offetuoso utterances uses the page's canonical link when available.

This page's canonical link is missing the path. https://offetuoso.github.io/foo/bar/2021/02/03/Markdown/

<link rel="canonical" href="http://offetuoso.github.io/"/>
offetuoso commented 3 years ago

@jdanyow thanks ! i'll checking canonical link

sweeneyskirt-sl commented 3 years ago

I had the same issue with the redirect on sign-in. When I inspect the page, I see the following warning:

A cookie associated with a cross-site resource at http://utteranc.es/ was set without the `SameSite` attribute. It has been blocked, as Chrome now only delivers cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
Misaka-0x447f commented 2 years ago

please add this to readme.

ericsmalling commented 1 year ago

Thank you for this info - my Hugo based site has same problem. Change link ref as follows and works fine now!

<link rel="canonical" href="{{ .Permalink }}"/>