Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

App Rejected for Not Following Immediate OAuth Requirement - App Now Suspended

App Rejected for Not Following Immediate OAuth Requirement - App Now Suspended

supplyq
Shopify Partner
6 0 2

I have been having quite a difficult time getting my app approved, as I continue to get stuck by not directing users to immediate oauth requirement.

 

The frustrating part is - after being rejected the first time, I wrote an entirely separate registration process for my app purely for users that register through the Shopify app store.  Working in my test environment, and with my test stores, I was able to successful register a test store, and everything seemed well.

 

Nonetheless my app was still not approved, and to add insult to injury, my app has now been suspended for 2 weeks from resubmitting.  I'm lost as to where to turn next, given my endpoints worked for me in a test environment, and the only advice I get from shopify on how to fix is a lame 5 second screen grab that shows an error page when they tested the app.  Not even a full url for me to potentially diagnose where the endpoint may have broken.

 

I've seen other users with issues and posted my issues in a separate thread, but I feel this merited its own thread, because it feels it is bad form to suspend me from resubmitting when everything is seemingly working on my end.  I'm new to the development world, and sometimes all we need is a push in the right direction, and getting silence and a suspension from Shopify is extremely frustrating.

 

Here's my python endpoint that initiates authentication, just in case.

 

 

@router.get("/shopify/install")
async def shopify_install(request: Request, db: Session = Depends(get_db)):
    shop_url = request.query_params.get("shop")
    if not shop_url:
        raise HTTPException(status_code=400, detail="Missing 'shop' parameter")
    
    shopify_auth_url = get_shopify_auth_url(shop_url, is_shopify_registration=True)
    return RedirectResponse(url=shopify_auth_url, status_code=status.HTTP_303_SEE_OTHER)

def get_shopify_auth_url(shop_url, is_shopify_registration=False, scopes=shopify_scope):
    if shop_url is None:
        raise ValueError('shop_url is none')
    
    version = shopify_api_version
    session = shopify.Session(shop_url, version)
    shopify_state = binascii.b2a_hex(os.urandom(15)).decode("utf-8")
    
    if is_shopify_registration:
        shopify_redirect = f'{base_url}/api_connections/shopify/auth/callback-initial'
    else:
        shopify_redirect = f'{base_url}/api_connections/shopify/auth/callback'
    
    print(f'This is shopify redirect: {shopify_redirect}')
    permission_url = session.create_permission_url(scopes, shopify_redirect, shopify_state)
    return permission_url

 

 

 

Replies 0 (0)