File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Firestore/core/src/firebase/firestore/auth Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 120
120
}
121
121
};
122
122
123
+ bool force_refresh = false ;
124
+ {
125
+ std::lock_guard<std::mutex> lock{contents_->mutex };
126
+ force_refresh = contents_->force_refresh ;
127
+ contents_->force_refresh = false ;
128
+ }
129
+
123
130
// TODO(wilhuff): Need a better abstraction over a missing auth provider.
124
131
if (contents_->auth ) {
125
- [contents_->auth getTokenForcingRefresh: contents_-> force_refresh
132
+ [contents_->auth getTokenForcingRefresh: force_refresh
126
133
withCallback: get_token_callback];
127
134
} else {
128
135
// If there's no Auth provider, call back immediately with a nil
129
136
// (unauthenticated) token.
130
137
get_token_callback (nil , nil );
131
138
}
132
- contents_->force_refresh = false ;
133
139
}
134
140
135
141
void FirebaseCredentialsProvider::InvalidateToken () {
142
+ std::lock_guard<std::mutex> lock{contents_->mutex };
136
143
contents_->force_refresh = true ;
137
144
}
138
145
You can’t perform that action at this time.
0 commit comments