Skip to content

Commit

Permalink
Merge pull request #48 from bismark/patch-1
Browse files Browse the repository at this point in the history
Parse scopes to match Ueberauth typespec
  • Loading branch information
swelham authored Apr 6, 2022
2 parents d07b9ef + 26a7408 commit 3f9ff9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ueberauth/strategy/microsoft.ex
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ defmodule Ueberauth.Strategy.Microsoft do

def credentials(conn) do
token = conn.private.ms_token
scope_string = token.other_params["scope"] || ""
scopes = String.split(scope_string, " ", trim: true)

%Credentials{
expires: token.expires_at != nil,
expires_at: token.expires_at,
scopes: token.other_params["scope"],
scopes: scopes,
token: token.access_token,
refresh_token: token.refresh_token,
token_type: token.token_type
Expand Down

0 comments on commit 3f9ff9a

Please sign in to comment.