This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MainActivity extends AppCompatActivity { | |
| private static final String TAG = MainActivity.class.getSimpleName(); | |
| private static int APP_REQUEST_CODE = 99; | |
| private FirebaseAuth mAuth; | |
| private FirebaseAuth.AuthStateListener mAuthListener; | |
| private CloudFunctions mCloudFunctions; | |
| public void onLogoutClick(View view) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface CloudFunctions { | |
| @GET("getCustomToken") | |
| Call<ResponseBody> getCustomToken(@Query("access_token") String accessToken); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const hmac_sha256 = require('crypto-js/hmac-sha256'); | |
| const request = require('request'); | |
| const functions = require('firebase-functions'); | |
| // in order to be able to create custom token we need to initialize Firebase | |
| // Admin SDK with private key | |
| // https://firebase.google.com/docs/admin/setup | |
| const serviceAccount = require('./service-account-key.json'); | |
| const admin = require('firebase-admin'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| firebase login | |
| firebase init functions | |
| # set app secret environment variable | |
| firebase functions:config:set facebook.app_secret="<FACEBOOK_APP_SECRET>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl create configmap nginx-lb-config --from-file=nginx-lb.configmap --dry-run -o yaml | kubectl replace configmap nginx-lb-config -f - |