Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the text of sign in button #10

Closed
mailtokun opened this issue Feb 28, 2020 · 4 comments
Closed

How to change the text of sign in button #10

mailtokun opened this issue Feb 28, 2020 · 4 comments

Comments

@mailtokun
Copy link

No description provided.

@amourya-systango
Copy link
Contributor

We are looking at it @mailtokun. Stay tuned

@mailtokun
Copy link
Author

We are looking at it @mailtokun. Stay tuned

Thanks. It's very important for non-English country.

@songjihyeok
Copy link

songjihyeok commented Apr 8, 2020

I solved. but it is a little annoying.

you should change the nodemodule/react-native-apple-authentification/index.js

i changed like this ( i use korean )

import React from 'react';
import {TouchableOpacity, Text, StyleSheet,Dimensions} from 'react-native'
import { NativeModules, requireNativeComponent ,Platform } from 'react-native';

const { AppleAuthentication } = NativeModules;

// export const RNSignInWithAppleButton = requireNativeComponent('RNCSignInWithAppleButton');

export const SignInWithAppleButton = (buttonStyle, callBack) => {
if(Platform.OS === 'ios'){
return <TouchableOpacity style={styles.appleLoginButton} onPress={async () => {

    await AppleAuthentication.requestAsync({
      requestedScopes: [AppleAuthentication.Scope.FULL_NAME, AppleAuthentication.Scope.EMAIL],
    }).then((response) => {
      callBack(response) //Display response
      }, (error) => {
        callBack(error) //Display error
       
    });

}}>
<Text style = {{ fontSize : 15, color: "white" }}>
애플계정으로 로그인하기

}else{ return null

}

}

export default AppleAuthentication;

const styles = StyleSheet.create({
appleLoginButton:{
borderRadius : 4,
backgroundColor : "black",
width : Dimensions.get('window').width/1.1,

height : 60,
justifyContent : "center",
alignItems : "center",
marginBottom: "3%"

}
})

You can customizing the button by changing it to touchableopacity
but you should change it everytime when you remove the nodemodules or newly install it

스크린샷 2020-04-08 오후 7 30 04

@amourya-systango
Copy link
Contributor

amourya-systango commented Sep 4, 2020

I have included the changes shared by @songjihyeok in the master branch in version 1.0.7. Now apple login button title could be changed. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants