Skip to content

Commit

Permalink
FIX: ensure authentication_data cookie is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoMcA committed Sep 5, 2019
1 parent 2b15640 commit c419042
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/controllers/mozilla_iam/dinopark_link_controller.rb
Expand Up @@ -9,11 +9,13 @@ def link
profile = Profile.for(current_user)
profile.dinopark_enabled = true
profile.force_refresh
cookies.delete(:authentication_data)
render json: { success: true }, status: 200
end

def dont_show
Profile.set(current_user, :never_show_dinopark_modal, true)
cookies.delete(:authentication_data)
render json: { success: true }, status: 200
end

Expand Down
Expand Up @@ -7,7 +7,7 @@ export default {
withPluginApi('0.8.30', api => {

var data = $.cookie("authentication_data")
$.removeCookie("authentication_data")
$.removeCookie("authentication_data", { path: "/" })

if (data) {
data = JSON.parse(data)
Expand Down
2 changes: 1 addition & 1 deletion plugin.rb
@@ -1,6 +1,6 @@
# name: mozilla-iam
# about: A plugin to integrate Discourse with Mozilla's Identity and Access Management (IAM) system
# version: 1.4.1
# version: 1.4.2
# authors: Leo McArdle
# url: https://github.com/mozilla/discourse-mozilla-iam

Expand Down

0 comments on commit c419042

Please sign in to comment.