Skip to content

Instantly share code, notes, and snippets.

View mario1987's full-sized avatar
🏠
Working from home

Mario mario1987

🏠
Working from home
View GitHub Profile
@mario1987
mario1987 / FirebaseUserIdTokenInterceptor.java
Created October 8, 2020 18:29 — forked from janakagamini/FirebaseUserIdTokenInterceptor.java
A simple Interceptor to include a Firebase user's id token in all requests. Useful for authenticating Firebase users with a custom backend. See: https://firebase.google.com/docs/auth/admin/verify-id-tokens#retrieve_id_tokens_on_clients)
public class FirebaseUserIdTokenInterceptor implements Interceptor {
// Custom header for passing ID token in request.
private static final String X_FIREBASE_ID_TOKEN = "YOUR-CUSTOM-HEADER";
@Override
public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
try {
@mario1987
mario1987 / .gitignore
Created September 9, 2020 07:27 — forked from FullStackForger/.gitignore
.gitignore for Unity3d project
###
# Unity folders and files
###
[Aa]ssets/AssetStoreTools*
[Bb]uild/
[Ll]ibrary/
[Ll]ocal[Cc]ache/
[Oo]bj/
[Tt]emp/
[Uu]nityGenerated/
@mario1987
mario1987 / .gitignore
Created September 9, 2020 07:27 — forked from FullStackForger/.gitignore
.gitignore for Unity3d project
###
# Unity folders and files
###
[Aa]ssets/AssetStoreTools*
[Bb]uild/
[Ll]ibrary/
[Ll]ocal[Cc]ache/
[Oo]bj/
[Tt]emp/
[Uu]nityGenerated/