javascript - How to combine two `hello.init` into one? -
i trying use hello.js init api sign in microsoft graph later. code below how doing , works.
however, there way combine these 2 hello.init
one? thanks
hello.init({ msft: { oauth: { version: 2, auth: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize' }, scope_delim: ' ', form: false } }); hello.init({ msft: myappid }, { redirect_uri: window.location.href });
i got answer creator of hello.js andrew dodson on github.
hello.init ({msft:appid})
shorthello.init ({msft:{id:appid}})
need define id prop on definition , it'll work. fyi undocumented , may change in future.
so in case, solution
hello.init({ msft: { id: myappid, oauth: { version: 2, auth: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize' }, scope_delim: ' ', form: false }, }, { redirect_uri: window.location.href } );
Comments
Post a Comment