Firebase User and Authentication

This library is used for managing with Firebase User and Authentication System.

License

License

Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

com.github.alperkurtul
ArtifactId

ArtifactId

spring-boot-starter-firebase-user-authentication
Last Version

Last Version

1.0.0.RELEASE
Release Date

Release Date

Type

Type

jar
Description

Description

Firebase User and Authentication
This library is used for managing with Firebase User and Authentication System.
Project URL

Project URL

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

Source Code Management

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

Download spring-boot-starter-firebase-user-authentication

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.alperkurtul/spring-boot-starter-firebase-user-authentication/ -->
<dependency>
    <groupId>com.github.alperkurtul</groupId>
    <artifactId>spring-boot-starter-firebase-user-authentication</artifactId>
    <version>1.0.0.RELEASE</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.alperkurtul/spring-boot-starter-firebase-user-authentication/
implementation 'com.github.alperkurtul:spring-boot-starter-firebase-user-authentication:1.0.0.RELEASE'
// https://jarcasting.com/artifacts/com.github.alperkurtul/spring-boot-starter-firebase-user-authentication/
implementation ("com.github.alperkurtul:spring-boot-starter-firebase-user-authentication:1.0.0.RELEASE")
'com.github.alperkurtul:spring-boot-starter-firebase-user-authentication:jar:1.0.0.RELEASE'
<dependency org="com.github.alperkurtul" name="spring-boot-starter-firebase-user-authentication" rev="1.0.0.RELEASE">
  <artifact name="spring-boot-starter-firebase-user-authentication" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.alperkurtul', module='spring-boot-starter-firebase-user-authentication', version='1.0.0.RELEASE')
)
libraryDependencies += "com.github.alperkurtul" % "spring-boot-starter-firebase-user-authentication" % "1.0.0.RELEASE"
[com.github.alperkurtul/spring-boot-starter-firebase-user-authentication "1.0.0.RELEASE"]

Dependencies

compile (2)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-web jar 2.2.0.RELEASE
org.json : json jar 20190722

test (1)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar 2.2.0.RELEASE

Project Modules

There are no modules declared in this project.

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.

firebase-web-api-key : [your-firebase-project-web-api-key]

In a @Configuration class in your application, create a @Bean for UserAuthenticationServiceImpl class.

@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.

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

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

<dependency>
    <groupId>com.github.alperkurtul</groupId>
    <artifactId>spring-boot-starter-firebase-user-authentication</artifactId>
    <version>1.0.0.RELEASE</version>
</dependency>

and How to Use

Just simply use methods.

@Autowired
private UserAuthenticationServiceImpl userAuthenticationServiceImpl;
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...

Versions

Version
1.0.0.RELEASE