#Jase-Laravel-dev

1 messages · Page 1 of 1 (latest)

raw skiff
#

Hi there! You shouldn't need to submit your application for your account in order to use testmode.

#

Can you tell me more about what is coming back with null values?

sterile lodge
#

Hey, for sure

I am working with Laravel + Socialite setting up sign in / sign up

#
  +id: "acct_1L6d25K30lMwEdkD"
  +nickname: null
  +name: null
  +email: null
  +avatar: null
  +user: array:18 [▼
    "id" => "acct_1L6d25K30lMwEdkD"
    "object" => "account"
    "business_profile" => array:7 [▼
      "mcc" => null
      "name" => "ecomm"
      "support_address" => null
      "support_email" => null
      "support_phone" => null
      "support_url" => null
      "url" => null
    ]
#

thats what I am receiving back

raw skiff
#

Where exactly are you receiving that?

#

Looks like you are using Standard Accounts

sterile lodge
#

on my call back URL, I am dumping out the payload when it comes back

raw skiff
#

And you are connecting via OAuth

sterile lodge
#

yes

raw skiff
#

Ack okay

#

So first, highly recommend not using OAuth

#

That is our legacy flow for connecting accounts

sterile lodge
#

ok, this is what Laravel's Socialite is using

raw skiff
#

Ah okay. I'm not very familiar with Socialite.

sterile lodge
#

thats essentially what its doing

raw skiff
#

I see

#

So yeah, with OAuth you are going to run into challenges here as to create a test-mode only account means you won't have data returned

sterile lodge
#

ooo ok

raw skiff
#

You would need to complete the OAuth onboarding with real data

#

Which means an actual bank account

#

Since that account can always be activated thereafter

#

It will require that

#

Like currently I assume when you go through OAuth you are just clicking "skip this form"

sterile lodge
#

yes

#

when I do that its asking me for my mobile number

raw skiff
#

Yeah so that will create a test-mode only account which won't have any data

#

And it allows you to test things like fund-flows on the account

#

But you can't really test onboarding info without putting in "real" data

sterile lodge
#

ok

#

So then OAuth is just not a good method to use for User (Vendor) onboarding to the application

raw skiff
#

It is fine. It just is hard to test the onboarding flow since when you create an account not using the mentioned button the account can be used in livemode (it can have an application submitted) so we require real information in that onboarding flow.

sterile lodge
#

are there any resources available on simple OAuth flows to use for loign and signup

raw skiff
#

Can you tell me what issue you are specifically running into?

sterile lodge
#

Right now the flow I am trying to work out is The user comes to the login page, they can either sign up or I would like them to be able to click a stripe button that would allow them to sign in with or sign up with stripe

https://connect.stripe.com/oauth/v2/authorize?client_id=ca_LoGG2l4dB2dy0bLv05bwB1hvk5o8uvcX&redirect_uri=https%3A%2F%2Fecomm.dorkside.dev%2Fauth%2Fstripe%2Fcallback&scope=read_write&response_type=code&state=VgkIAe2EfCp5rSPO79mN72LhZ0zV6o16WyRfk6lZ

that is the URL generated from laravel's socialite

Once they comback to the applicaitons callback, I am checking in the database if a user already exists with the ID, if not, create them using the email and nickname

#

I do get an ID

raw skiff
#

Yeah that's fine. Easiest way to do this though is just to store the Stripe Account ID

sterile lodge
#

and have the user still provide the email

#

?

raw skiff
#

Are you collecting the email outside of OAuth?

sterile lodge
#

I could

#

but the idea was that if they had a stripe account I would capture and use that

#

but I think I might have to collect outside of if I am to use multiple signin methods

#

As I am to understand that in test mode I will not receive the email, but for live I would for completed accounts, So in those cases when the email is available I should be able to attach it to a local user should there be one present -- sorry kinda typing out loud here

raw skiff
#

Yep you are correct.

#

Currently email will be "none"

#

Since you can't set it for one of these test-mode only accounts

#

But you will receive it in livemode

#

It will be required from the user when they go through the OAuth flow

#

So you don't need to collect it yourself as well

sterile lodge
#

ok, I think I can work that out from here

#

thank you for the help!

raw skiff
#

Sure!