File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
authorized-https-endpoint/public Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ Demo.prototype.signOut = function() {
6363
6464// Does an authenticated request to a Firebase Functions endpoint using an Authorization header.
6565Demo . prototype . startFunctionsRequest = function ( ) {
66- firebase . auth ( ) . currentUser . getToken ( ) . then ( function ( token ) {
66+ firebase . auth ( ) . currentUser . getIdToken ( ) . then ( function ( token ) {
6767 console . log ( 'Sending request to' , this . helloUserUrl , 'with ID token in Authorization header.' ) ;
6868 var req = new XMLHttpRequest ( ) ;
6969 req . onload = function ( ) {
@@ -81,7 +81,7 @@ Demo.prototype.startFunctionsRequest = function() {
8181// Does an authenticated request to a Firebase Functions endpoint using a __session cookie.
8282Demo . prototype . startFunctionsCookieRequest = function ( ) {
8383 // Set the __session cookie.
84- firebase . auth ( ) . currentUser . getToken ( true ) . then ( function ( token ) {
84+ firebase . auth ( ) . currentUser . getIdToken ( true ) . then ( function ( token ) {
8585 // set the __session cookie
8686 document . cookie = '__session=' + token + ';max-age=3600' ;
8787
You can’t perform that action at this time.
0 commit comments