Skip to content

Commit

Permalink
feat(neon): Add new JWT access token to DM session
Browse files Browse the repository at this point in the history
  • Loading branch information
Samir AMZANI committed May 15, 2017
1 parent a3ea561 commit b173ef2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/auth.js
Expand Up @@ -153,10 +153,17 @@ DM.provide('Auth',
if (window.location.host.match(/dailymotion\.com$/))
{
var cookie = document.cookie.match(/\bsid=([a-f0-9]+)/);
var neon = document.cookie.match(/\bneon=([0-9]{1})/);
var neon_access_token = document.cookie.match(/\baccess_token=([a-zA-Z0-9._-]+)/);
if (cookie)
{
DM.Auth.setSession({'access_token': cookie[1]});
}
if (neon && neon[1] == "1")
{
DM.Auth.setSession({'access_token': neon_access_token[1]});
}

}
},

Expand Down

0 comments on commit b173ef2

Please sign in to comment.