Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.google.firebase.FirebaseOptions;
import com.google.firebase.messaging.FirebaseMessaging;
import java.io.IOException;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
Expand All @@ -22,7 +23,10 @@ public class FCMConfig {
public FirebaseMessaging firebaseMessaging() {
try {
GoogleCredentials googleCredentials = GoogleCredentials
.fromStream(new ClassPathResource(firebaseConfigPath).getInputStream());
.fromStream(new ClassPathResource(firebaseConfigPath).getInputStream())
.createScoped(List.of(
"https://www.googleapis.com/auth/firebase.messaging"
));

FirebaseOptions firebaseOptions = FirebaseOptions.builder()
.setCredentials(googleCredentials)
Expand Down
Loading