Jump to content
Martifan

Authorization using Apple ID

Recommended Posts

Hello,
please tell me any ideas, how can you implement authorization using Apple ID? 
thank you for advance

Edited by Martifan

Share this post


Link to post

I’ve not tried it yet but there’s an article in Chinese here which takes you through how to do it.

https://translate.googleusercontent.com/translate_c?depth=1&nv=1&pto=aue&rurl=translate.google.co.uk&sl=zh-CN&sp=nmt4&tl=en&u=https://blog.csdn.net/delphiteacher/article/details/104344285&usg=ALkJrhizIuLwrZCrBE-qSZ-hlKqRfCeYKQ

 

If you manage to get it working, it would be great if you could share your findings with the group! I think David Nottage was also looking into this but not sure if he got anywhere with it yet.

Share this post


Link to post
Just now, Chris Pim said:

I think David Nottage was also looking into this but not sure if he got anywhere with it yet

Yes, I have an implementation for it, and a while ago was seeking people to try it out. I haven't done anything to it for a while, however I have attached the work-in-progress to this reply. The plan is to include the final result into Kastri:

 

https://github.com/DelphiWorlds/Kastri

AppleSignin.zip

  • Thanks 1

Share this post


Link to post

118320331_337090537445210_7998354651199961685_n.jpg

 

I press the button and nothing happens

i am using delphi 10.3.3

Edited by Martifan

Share this post


Link to post

but you can make it so that the button is not dynamically created, but so that for the previously present form, let Button1

Share this post


Link to post
1 hour ago, Martifan said:

but you can make it so that the button is not dynamically created

That's the plan. I have some other controls coming that will be included.

Share this post


Link to post
On 8/23/2020 at 8:03 AM, Dave Nottage said:

but you can make it so that the button is not dynamically created

Hello, haven't you include other items yet?

Edited by Martifan

Share this post


Link to post
19 minutes ago, Martifan said:

Hello, haven't you include other items yet?

Sorry.. been busy with Memorizor. They're still coming. Were you after an installable component for Apple Signin, or something else?

Share this post


Link to post

I want to change the style of the button or use another button with more effects

Edited by Martifan

Share this post


Link to post
4 minutes ago, Dave Nottage said:

Sorry.. been busy with Memorizor. They're still coming. Were you after an installable component for Apple Signin, or something else?

I want to change the style of the button or use another button with more effects

Share this post


Link to post
59 minutes ago, Martifan said:

I want to change the style of the button or use another button with more effects

The implementation I have done uses the native control, i.e. ASAuthorizationAppleIDButton, which is fairly limited in the styles available. Please refer to:

 

  https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidbutton?language=objc

  https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidbuttonstyle?language=objc

 

If you have a sign-in button which does not have a style that is mandated by Apple, your app is likely to be rejected. See:

 

  https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/buttons/#creating-a-custom-sign-in-with-apple-button

 

Examples of rejections:

 

  https://community.auth0.com/t/apple-store-rejected-app-because-of-sign-in-with-apple-styles/43854

  https://github.com/firebase/FirebaseUI-iOS/issues/823

 

For these reasons, I'm not going to be implementing styles other than what they provide.

 

 

Share this post


Link to post
9 minutes ago, Dave Nottage said:

The implementation I have done uses the native control, i.e. ASAuthorizationAppleIDButton, which is fairly limited in the styles available. Please refer to:

 

  https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidbutton?language=objc

  https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidbuttonstyle?language=objc

 

If you have a sign-in button which does not have a style that is mandated by Apple, your app is likely to be rejected. See:

 

  https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/buttons/#creating-a-custom-sign-in-with-apple-button

 

Examples of rejections:

 

  https://community.auth0.com/t/apple-store-rejected-app-because-of-sign-in-with-apple-styles/43854

  https://github.com/firebase/FirebaseUI-iOS/issues/823

 

For these reasons, I'm not going to be implementing styles other than what they provide.

 

 

Ok, thanks, I just wanted a more round button to do.

How do I change the color of buttons and text on a button? what style is on the phone?

black and white?

 

77387591-cab57d80-6dc8-11ea-8e7a-5cbf6accdbf6.png

Edited by Martifan

Share this post


Link to post
49 minutes ago, Martifan said:

Ok, thanks, I just wanted a more round button to do.

How do I change the color of buttons and text on a button? what style is on the phone?

Ah yes, sorry.. the roundness can be changed. I'll take a look at adding that. These are the style values:

 

  ASAuthorizationAppleIDButtonStyleBlack

  A black button.

 

  ASAuthorizationAppleIDButtonStyleWhiteOutline

  A button with a white outline.

 

  ASAuthorizationAppleIDButtonStyleWhite

 

Which are displayed in the link I gave:

 

  https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/buttons/#creating-a-custom-sign-in-with-apple-button

 

I'll also take a look at adding support for those.

Share this post


Link to post
2 hours ago, Dave Nottage said:

Ah yes, sorry.. the roundness can be changed. I'll take a look at adding that. These are the style values:

 

  ASAuthorizationAppleIDButtonStyleBlack

  A black button.

 

  ASAuthorizationAppleIDButtonStyleWhiteOutline

  A button with a white outline.

 

  ASAuthorizationAppleIDButtonStyleWhite

 

Which are displayed in the link I gave:

 

  https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/buttons/#creating-a-custom-sign-in-with-apple-button

 

I'll also take a look at adding support for those.

i did so but still the button is black

function TiOSAppleIDButton.GetView: ASAuthorizationAppleIDButton;
begin
  Result := TASAuthorizationAppleIDButton.Wrap(TASAuthorizationAppleIDButton.OCClass.buttonWithType(ASAuthorizationAppleIDButtonTypeSignIn,
    ASAuthorizationAppleIDButtonStyleWhite));
end;

Share this post


Link to post
5 minutes ago, Dave Nottage said:

I'll see if I can debug it, thanks

Thank you very much in advance

then I'll wait 🙂 and if you can add round buttons

Share this post


Link to post
18 hours ago, Martifan said:

Thank you very much in advance

then I'll wait 🙂 and if you can add round buttons

Has not been successful so far. The initWithAuthorizationButtonType method seems to ignore the 2nd parameter being passed to it, as well as the setCornerRadius method. Very odd

Share this post


Link to post
19 minutes ago, Dave Nottage said:

Has not been successful so far. The initWithAuthorizationButtonType method seems to ignore the 2nd parameter being passed to it, as well as the setCornerRadius method. Very odd

it could be some kind of bug?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×