Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alperkurtul/spring-boot-starter-firebase-user-authentication

RELEASED version -- Firebase User Management and Authentication in Spring Boot
https://github.com/alperkurtul/spring-boot-starter-firebase-user-authentication

firebase firebase-authentication firebase-user spring-boot springboot

Last synced: 13 days ago
JSON representation

RELEASED version -- Firebase User Management and Authentication in Spring Boot

Awesome Lists containing this project

README

        

# `Firebase User Management and Authentication` in Spring Boot
This project gives you the ability to use `Firebase User Management and Authentication` methods. To achieve this, you just have to add the dependency and simply use the methods in your Spring Boot application. These are the list of methods you can use in this release(1.0.0):

- signUpWithEmailAndPassword
- signInWithEmailAndPassword
- deleteUserAccount
- exchangeRefreshTokenToIdToken

## How to Apply

### Configuration

Put a `firebase-web-api-key.txt` file in the root of classpath and specify `firebase-web-api-key : ` property in it.
```properties
firebase-web-api-key : [your-firebase-project-web-api-key]
```

In a `@Configuration` class in your application, create a `@Bean` for `UserAuthenticationServiceImpl` class.
```java
@Configuration
public class DemoConfig {

@Bean
public UserAuthenticationServiceImpl userAuthenticationServiceImpl() {
return new UserAuthenticationServiceImpl();
}

}
```

### Dependencies

Primarily, you have to add `spring-boot-starter-web` dependency in your Spring Boot application.
```xml

org.springframework.boot
spring-boot-starter-web

```

Then, you have to also add this dependency in your `pom.xml`.
```xml

com.github.alperkurtul
spring-boot-starter-firebase-user-authentication
1.0.0.RELEASE

```

### and How to Use

Just simply use methods.

```java
@Autowired
private UserAuthenticationServiceImpl userAuthenticationServiceImpl;
```

```java
FirebaseSignInSignUpResponseBean firebaseSignInSignUpResponseBean = userAuthenticationServiceImpl.signInWithEmailAndPassword("[email protected]", "test07");
```

### Demo

Here is a demo that I made for you. `Demo`

## Next

I hope, I will add new features in the next. Don't be shy to send your advice to me.
Take care...