spring-guides / tut-spring-boot-oauth2

Spring Boot and OAuth2:: A tutorial on "social" login and single sign on with Facebook and Github

Home Page:https://spring.io/guides/tutorials/spring-boot-oauth2/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logout button - include js.cookie.js script

tstavinoha opened this issue · comments

js-cookie needs to be imported in head tag before it can be used.

<head>
    ....
    <script type="text/javascript" src="/webjars/js-cookie/js.cookie.js"></script>
</head>

Otherwise, the following error shows up in the developer console:

    at Object.beforeSend (http://localhost:8080/:41:25)
    at Function.ajax (http://localhost:8080/webjars/jquery/jquery.min.js:4:10323)
    at Function.n.(anonymous function) [as post] (http://localhost:8080/webjars/jquery/jquery.min.js:4:11574)
    at logout (http://localhost:8080/:54:11)
    at HTMLButtonElement.onclick (http://localhost:8080/#_=_:26:64)

Works for me (it's already included at line 27:

).

Yeah, I've seen it a bit later. I created a PR to just put this step in the tutorial documentation, because all the other changes were explicitly listed and guide was smooth until that point.

Fixed in #64